Lines Matching refs:this

30 		$this->vars = $vars;
34 $this->osbibVersion = "2.0";
36 $this->session = new SESSION();
38 $this->messages = new MESSAGES();
40 $this->success = new SUCCESS();
42 $this->errors = new ERRORS();
46 $this->style = new LOADSTYLE();
47 $this->styles = $this->style->loadDir(OSBIB_STYLE_DIR);
53 return $this->$method();
59 $this->session->clearArray("cite");
60 $this->session->clearArray("style");
61 $pString = MISC::h($this->messages->text("heading", "styles"), FALSE, 3);
64 $pString .= MISC::p(MISC::a("link", $this->messages->text("style", "addLabel"),
66 if(sizeof($this->styles))
68 $pString .= MISC::p(MISC::a("link", $this->messages->text("style", "copyLabel"),
70 $pString .= MISC::p(MISC::a("link", $this->messages->text("style", "editLabel"),
78 $pString = MISC::h($this->messages->text("heading", "styles",
79 " (" . $this->messages->text("style", "addLabel") . ")"), FALSE, 3);
82 $pString .= $this->displayStyleForm('add');
88 if($error = $this->validateInput('add'))
89 $this->badInput($error, 'addInit');
90 $this->writeFile();
91 $pString = $this->success->text("style", " " . $this->messages->text("misc", "added") . " ");
92 $this->styles = $this->style->loadDir(OSBIB_STYLE_DIR);
93 return $this->display($pString);
98 $pString = MISC::h($this->messages->text("heading", "styles",
99 " (" . $this->messages->text("style", "editLabel") . ")"), FALSE, 3);
101 $styleFile = $this->session->getVar('editStyleFile');
103 $pString .= FORM::selectedBoxValue(FALSE, "editStyleFile", $this->styles, $styleFile, 20);
105 $pString .= FORM::selectFBoxValue(FALSE, "editStyleFile", $this->styles, 20);
114 $this->loadEditSession();
115 $pString = MISC::h($this->messages->text("heading", "styles",
116 " (" . $this->messages->text("style", "editLabel") . ")"), FALSE, 3);
119 $pString .= $this->displayStyleForm('edit');
126 $this->session->clearArray("style");
132 $this->session->setVar('editStyleFile', $this->vars['editStyleFile']);
133 $dir = strtolower($this->vars['editStyleFile']);
134 $fileName = $this->vars['editStyleFile'] . ".xml";
140 $this->session->setVar("style_shortName", $this->vars['editStyleFile']);
141 $this->session->setVar("style_longName", base64_encode($info['description']));
146 $this->session->setVar("cite_" . $array['_NAME'],
152 $this->session->setVar("style_" . $array['_NAME'],
155 $this->arrayToTemplate($types);
161 if(!empty($this->$type))
162 $this->session->setVar($sessionKey, base64_encode($this->$type));
163 if(array_key_exists($type, $this->fallback))
166 $this->session->setVar($sessionKey, base64_encode($this->fallback[$type]));
171 $this->badInput($this->errors->text("file", "read"));
176 $this->fallback = array();
199 $this->fallback[$type] = $array['_DATA'];
218 $this->$type = array();
296 $this->$type = $tempString;
302 if($error = $this->validateInput('edit'))
303 $this->badInput($error, 'editDisplay');
304 $dirName = OSBIB_STYLE_DIR . "/" . strtolower(trim($this->vars['styleShortName']));
305 $fileName = $dirName . "/" . strtoupper(trim($this->vars['styleShortName'])) . ".xml";
306 $this->writeFile($fileName);
307 $pString = $this->success->text("style", " " . $this->messages->text("misc", "edited") . " ");
308 return $this->display($pString);
313 $pString = MISC::h($this->messages->text("heading", "styles",
314 " (" . $this->messages->text("style", "copyLabel") . ")"), FALSE, 3);
316 $pString .= FORM::selectFBoxValue(FALSE, "editStyleFile", $this->styles, 20);
325 $this->loadEditSession(TRUE);
326 $pString = MISC::h($this->messages->text("heading", "styles",
327 " (" . $this->messages->text("style", "copyLabel") . ")"), FALSE, 3);
330 $pString .= $this->displayStyleForm('copy');
338 $this->map = new STYLEMAP();
339 $pString = MISC::h($this->messages->text("cite", "citationFormat") . " (" .
340 $this->messages->text("cite", "citationFormatInText") . ")");
345 $this->messages->text("cite", "lastName"));
347 $example = array($this->messages->text("style", "creatorFirstNameFull"),
348 $this->messages->text("style", "creatorFirstNameInitials"));
349 $firstStyle = base64_decode($this->session->getVar("cite_creatorStyle"));
350 $otherStyle = base64_decode($this->session->getVar("cite_creatorOtherStyle"));
351 $initials = base64_decode($this->session->getVar("cite_creatorInitials"));
352 $firstName = base64_decode($this->session->getVar("cite_creatorFirstName"));
353 $useInitials = base64_decode($this->session->getVar("cite_useInitials"));
354 $td = MISC::b($this->messages->text("cite", "creatorStyle")) . MISC::br() .
355 FORM::selectedBoxValue($this->messages->text("style", "creatorFirstStyle"),
358 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorOthers"),
361 $td .= $this->messages->text("cite", "useInitials") . ' ' . FORM::checkbox(FALSE,
364 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorInitials"),
367 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorFirstName"),
369 $uppercase = base64_decode($this->session->getVar("cite_creatorUppercase")) ?
371 $td .= MISC::P(FORM::checkbox($this->messages->text("style", "uppercaseCreator"),
375 $twoCreatorsSep = base64_decode($this->session->getVar("cite_twoCreatorsSep"));
376 $betweenFirst = base64_decode($this->session->getVar("cite_creatorSepFirstBetween"));
377 $betweenNext = base64_decode($this->session->getVar("cite_creatorSepNextBetween"));
378 $last = base64_decode($this->session->getVar("cite_creatorSepNextLast"));
379 $td = MISC::b($this->messages->text("cite", "creatorSep")) .
380 MISC::p($this->messages->text("style", "ifOnlyTwoCreators") . " " .
382 $this->messages->text("style", "sepCreatorsFirst") . " " .
385 MISC::p($this->messages->text("style", "sepCreatorsNext") . MISC::br() .
386 $this->messages->text("style", "creatorSepBetween") . " " .
388 $this->messages->text("style", "creatorSepLast") . " " .
392 $example = array($this->messages->text("style", "creatorListFull"),
393 $this->messages->text("style", "creatorListLimit"));
394 $list = base64_decode($this->session->getVar("cite_creatorList"));
395 $listMore = base64_decode($this->session->getVar("cite_creatorListMore"));
396 $listLimit = base64_decode($this->session->getVar("cite_creatorListLimit"));
397 $listAbbreviation = base64_decode($this->session->getVar("cite_creatorListAbbreviation"));
398 $italic = base64_decode($this->session->getVar("cite_creatorListAbbreviationItalic")) ?
400 $td .= MISC::b($this->messages->text("cite", "creatorList")) .
403 $this->messages->text("style", "creatorListIf") . ' ' .
405 $this->messages->text("style", "creatorListOrMore") . ' ' .
407 $this->messages->text("style", "creatorListAbbreviation") . ' ' .
410 $this->messages->text("style", "italics"));
411 $list = base64_decode($this->session->getVar("cite_creatorListSubsequent"));
412 $listMore = base64_decode($this->session->getVar("cite_creatorListSubsequentMore"));
413 $listLimit = base64_decode($this->session->getVar("cite_creatorListSubsequentLimit"));
414 …$listAbbreviation = base64_decode($this->session->getVar("cite_creatorListSubsequentAbbreviation")…
415 $italic = base64_decode($this->session->getVar("cite_creatorListSubsequentAbbreviationItalic")) ?
418 $td .= MISC::b($this->messages->text("cite", "creatorListSubsequent")) .
421 $this->messages->text("style", "creatorListIf") . ' ' .
423 $this->messages->text("style", "creatorListOrMore") . ' ' .
425 $this->messages->text("style", "creatorListAbbreviation") . ' ' .
428 $this->messages->text("style", "italics"));
438 $example = array($this->messages->text("cite", "printCreator"),
439 $this->messages->text("cite", "omitCreator"));
440 $consecutive = base64_decode($this->session->getVar("cite_consecutiveCreator"));
441 $consecutiveSep = base64_decode($this->session->getVar("cite_consecutiveCreatorSep"));
442 $td = FORM::selectedBoxValue($this->messages->text("cite", "consecutiveCreator"),
445 $td .= $this->messages->text("cite", "consecutiveCreatorSep") . ' ' .
448 $template = base64_decode($this->session->getVar("cite_template"));
449 $availableFields = join(', ', $this->map->citation);
450 $consecutiveSep = base64_decode($this->session->getVar("cite_consecutiveCitationSep"));
451 $year = base64_decode($this->session->getVar("cite_yearFormat"));
452 $superscript = base64_decode($this->session->getVar("cite_templateSuperscript"));
453 $td = $this->messages->text("cite", "template") . ' ' .
456 $this->messages->text("cite", "superscript") . ' ' .
458 MISC::p(MISC::i($this->messages->text("style", "availableFields")) .
461 $td .= $this->messages->text("cite", "consecutiveCitationSep") . ' ' .
466 $input = base64_decode($this->session->getVar("cite_pageFormat"));
467 $td = FORM::selectedBoxValue($this->messages->text("style", "pageFormat"),
471 $td .= FORM::selectedBoxValue($this->messages->text("cite", "yearFormat"),
481 $ambiguousName = base64_decode($this->session->getVar("cite_ambiguousName")) ? TRUE : FALSE;
482 $ambiguousMore = base64_decode($this->session->getVar("cite_ambiguousMore")) ? TRUE : FALSE;
483 $ambiguousTitle = base64_decode($this->session->getVar("cite_ambiguousTitle")) ? TRUE : FALSE;
484 $ambiguousYear = base64_decode($this->session->getVar("cite_ambiguousYear")) ? TRUE : FALSE;
485 $nameFormat = base64_decode($this->session->getVar("cite_ambiguousNameFormat"));
486 $yearFormat = base64_decode($this->session->getVar("cite_ambiguousYearFormat"));
487 $td = MISC::p(MISC::b($this->messages->text("cite", "ambiguous")));
489 "cite_ambiguousName", $ambiguousName) . ' ' . $this->messages->text("cite", "ambiguousFull"));
491 "cite_ambiguousMore", $ambiguousMore) . ' ' . $this->messages->text("cite", "ambiguousMore"));
493 "cite_ambiguousTitle", $ambiguousTitle) . ' ' . $this->messages->text("cite", "ambiguousTitle"));
495 "cite_ambiguousYear", $ambiguousYear) . ' ' . $this->messages->text("cite", "ambiguousYear"));
497 $example = array($this->messages->text("style", "creatorFirstNameFull"),
499 $td = FORM::selectedBoxValue($this->messages->text("cite", "ambiguousNameFormat"),
503 $td = FORM::selectedBoxValue($this->messages->text("cite", "ambiguousYearFormat"),
511 $pString .= MISC::h($this->messages->text("cite", "citationFormat") . " (" .
512 $this->messages->text("cite", "citationFormatFootnote") . ")");
515 $style = base64_decode($this->session->getVar("cite_footnoteStyle"));
516 $example = array($this->messages->text("cite", "footnoteStyleBib"),
517 $this->messages->text("cite", "footnoteStyleInText"));
520 $ibid = base64_decode($this->session->getVar("cite_ibid"));
521 $ibidPage = base64_decode($this->session->getVar("cite_ibidPage"));
522 $td .= FORM::textInput($this->messages->text("cite", "ibid"), "cite_ibid", $ibid, 30, 255);
525 "cite_ibidPage", $ibidPage) . ' ' . $this->messages->text("cite", "ibidPage");
527 $idem = base64_decode($this->session->getVar("cite_idem"));
528 $td .= FORM::textInput($this->messages->text("cite", "idem"), "cite_idem", $idem, 30, 255);
530 $opCit = base64_decode($this->session->getVar("cite_opCit"));
531 $td .= FORM::textInput($this->messages->text("cite", "opCit"), "cite_opCit", $opCit, 30, 255);
534 $example = array($this->messages->text("cite", "footnoteCitationPageFormatNever"),
535 $this->messages->text("cite", "footnoteCitationPageFormatBib"),
536 $this->messages->text("cite", "footnoteCitationPageFormatTemplate"));
537 $pageFormat = base64_decode($this->session->getVar("cite_footnoteCitationPageFormat"));
538 $td = FORM::selectedBoxValue($this->messages->text("cite", "footnoteCitationPageFormat"),
541 $template = base64_decode($this->session->getVar("cite_footnotePageTemplate"));
542 $td .= $this->messages->text("cite", "template") . ' ' .
544 MISC::p(MISC::i($this->messages->text("style", "availableFields")) .
547 $example = array($this->messages->text("cite", "footnotePageAfter"),
548 $this->messages->text("cite", "footnotePageBefore"));
549 $pagePosition = base64_decode($this->session->getVar("cite_footnotePagePosition"));
550 $td .= FORM::selectedBoxValue($this->messages->text("cite", "footnotePagePosition"),
565 $this->map = new STYLEMAP();
566 $types = array_keys($this->map->types);
575 $input = $this->session->getVar("style_shortName");
577 $pString .= TABLE::td(FORM::textInput($this->messages->text("style", "shortName"),
579 MISC::br() . $this->messages->text("hint", "styleShortName"));
581 $pString .= FORM::hidden("editStyleFile", $this->vars['editStyleFile']) .
583 TABLE::td(MISC::b($this->vars['editStyleFile'] . ":  "),
586 $pString .= TABLE::td(FORM::textInput($this->messages->text("style", "shortName"),
588 MISC::br() . $this->messages->text("hint", "styleShortName"));
589 $input = base64_decode($this->session->getVar("style_longName"));
590 $pString .= TABLE::td(FORM::textInput($this->messages->text("style", "longName"),
596 $pString .= $this->displayCiteForm('copy');
598 $pString .= MISC::h($this->messages->text("style", "bibFormat"));
604 $this->messages->text("cite", "lastName"));
606 $example = array($this->messages->text("style", "creatorFirstNameFull"),
607 $this->messages->text("style", "creatorFirstNameInitials"));
608 $firstStyle = base64_decode($this->session->getVar("style_primaryCreatorFirstStyle"));
609 $otherStyle = base64_decode($this->session->getVar("style_primaryCreatorOtherStyle"));
610 $initials = base64_decode($this->session->getVar("style_primaryCreatorInitials"));
611 $firstName = base64_decode($this->session->getVar("style_primaryCreatorFirstName"));
612 $td = MISC::b($this->messages->text("style", "primaryCreatorStyle")) . MISC::br() .
613 FORM::selectedBoxValue($this->messages->text("style", "creatorFirstStyle"),
616 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorOthers"),
619 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorInitials"),
622 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorFirstName"),
624 $uppercase = base64_decode($this->session->getVar("style_primaryCreatorUppercase")) ?
626 $td .= MISC::P(FORM::checkbox($this->messages->text("style", "uppercaseCreator"),
628 $repeat = base64_decode($this->session->getVar("style_primaryCreatorRepeat"));
629 $exampleRepeat = array($this->messages->text("style", "repeatCreators1"),
630 $this->messages->text("style", "repeatCreators2"),
631 $this->messages->text("style", "repeatCreators3"));
632 $td .= FORM::selectedBoxValue($this->messages->text("style", "repeatCreators"),
634 $repeatString = base64_decode($this->session->getVar("style_primaryCreatorRepeatString"));
637 $firstStyle = base64_decode($this->session->getVar("style_otherCreatorFirstStyle"));
638 $otherStyle = base64_decode($this->session->getVar("style_otherCreatorOtherStyle"));
639 $initials = base64_decode($this->session->getVar("style_otherCreatorInitials"));
640 $firstName = base64_decode($this->session->getVar("style_otherCreatorFirstName"));
641 $td = MISC::b($this->messages->text("style", "otherCreatorStyle")) . MISC::br() .
642 FORM::selectedBoxValue($this->messages->text("style", "creatorFirstStyle"),
645 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorOthers"),
648 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorInitials"),
651 $td .= FORM::selectedBoxValue($this->messages->text("style", "creatorFirstName"),
653 $uppercase = base64_decode($this->session->getVar("style_otherCreatorUppercase")) ?
655 $td .= MISC::P(FORM::checkbox($this->messages->text("style", "uppercaseCreator"),
668 $twoCreatorsSep = base64_decode($this->session->getVar("style_primaryTwoCreatorsSep"));
669 $betweenFirst = base64_decode($this->session->getVar("style_primaryCreatorSepFirstBetween"));
670 $betweenNext = base64_decode($this->session->getVar("style_primaryCreatorSepNextBetween"));
671 $last = base64_decode($this->session->getVar("style_primaryCreatorSepNextLast"));
672 $pString .= TABLE::td(MISC::b($this->messages->text("style", "primaryCreatorSep")) .
673 MISC::p($this->messages->text("style", "ifOnlyTwoCreators") . " " .
675 $this->messages->text("style", "sepCreatorsFirst") . " " .
677 MISC::p($this->messages->text("style", "sepCreatorsNext") . MISC::br() .
678 $this->messages->text("style", "creatorSepBetween") . " " .
680 $this->messages->text("style", "creatorSepLast") . " " .
690 $twoCreatorsSep = base64_decode($this->session->getVar("style_otherTwoCreatorsSep"));
691 $betweenFirst = base64_decode($this->session->getVar("style_otherCreatorSepFirstBetween"));
692 $betweenNext = base64_decode($this->session->getVar("style_otherCreatorSepNextBetween"));
693 $last = base64_decode($this->session->getVar("style_otherCreatorSepNextLast"));
694 $pString .= TABLE::td(MISC::b($this->messages->text("style", "otherCreatorSep")) .
695 MISC::p($this->messages->text("style", "ifOnlyTwoCreators") . " " .
697 $this->messages->text("style", "sepCreatorsFirst") . " " .
699 MISC::p($this->messages->text("style", "sepCreatorsNext") . MISC::br() .
700 $this->messages->text("style", "creatorSepBetween") . " " .
702 $this->messages->text("style", "creatorSepLast") . " " .
716 $switch = base64_decode($this->session->getVar("style_editorSwitch"));
717 …$editorSwitchIfYes = stripslashes(base64_decode($this->session->getVar("style_editorSwitchIfYes"))…
718 $example = array($this->messages->text("style", "no"), $this->messages->text("style", "yes"));
719 $pString .= TABLE::td(MISC::b($this->messages->text("style", "editorSwitchHead")) . MISC::br() .
720 FORM::selectedBoxValue($this->messages->text("style", "editorSwitch"),
723 FORM::textInput($this->messages->text("style", "editorSwitchIfYes"),
732 $example = array($this->messages->text("style", "creatorListFull"),
733 $this->messages->text("style", "creatorListLimit"));
734 $list = base64_decode($this->session->getVar("style_primaryCreatorList"));
735 $listMore = base64_decode($this->session->getVar("style_primaryCreatorListMore"));
736 $listLimit = base64_decode($this->session->getVar("style_primaryCreatorListLimit"));
737 $listAbbreviation = base64_decode($this->session->getVar("style_primaryCreatorListAbbreviation"));
738 $italic = base64_decode($this->session->getVar("style_primaryCreatorListAbbreviationItalic")) ?
740 …$pString .= TABLE::td(MISC::b($this->messages->text("style", "primaryCreatorList")) . MISC::br() .
743 $this->messages->text("style", "creatorListIf") . ' ' .
745 $this->messages->text("style", "creatorListOrMore") . ' ' .
747 $this->messages->text("style", "creatorListAbbreviation") . ' ' .
750 $this->messages->text("style", "italics"));
751 $list = base64_decode($this->session->getVar("style_otherCreatorList"));
752 $listMore = base64_decode($this->session->getVar("style_otherCreatorListMore"));
753 $listLimit = base64_decode($this->session->getVar("style_otherCreatorListLimit"));
754 $listAbbreviation = base64_decode($this->session->getVar("style_otherCreatorListAbbreviation"));
755 $italic = base64_decode($this->session->getVar("style_otherCreatorListAbbreviationItalic")) ?
757 $pString .= TABLE::td(MISC::b($this->messages->text("style", "otherCreatorList")) . MISC::br() .
760 $this->messages->text("style", "creatorListIf") . ' ' .
762 $this->messages->text("style", "creatorListOrMore") . ' ' .
764 $this->messages->text("style", "creatorListAbbreviation") . ' ' .
767 $this->messages->text("style", "italics"));
775 $example = array($this->messages->text("style", "titleAsEntered"),
777 $input = base64_decode($this->session->getVar("style_titleCapitalization"));
778 …$pString .= TABLE::td(MISC::b($this->messages->text("style", "titleCapitalization")) . MISC::br() .
781 $input = base64_decode($this->session->getVar("style_editionFormat"));
782 $pString .= TABLE::td(MISC::b($this->messages->text("style", "editionFormat")) . MISC::br() .
785 $input = base64_decode($this->session->getVar("style_pageFormat"));
786 $pString .= TABLE::td(MISC::b($this->messages->text("style", "pageFormat")) . MISC::br() .
795 $input = base64_decode($this->session->getVar("style_dayFormat"));
796 $pString .= TABLE::td(MISC::b($this->messages->text("style", "dayFormat")) . MISC::br() .
798 $example = array("Feb", "February", $this->messages->text("style", "userMonthSelect"));
799 $input = base64_decode($this->session->getVar("style_monthFormat"));
800 $pString .= TABLE::td(MISC::b($this->messages->text("style", "monthFormat")) . MISC::br() .
803 $input = base64_decode($this->session->getVar("style_dateFormat"));
804 $pString .= TABLE::td(MISC::b($this->messages->text("style", "dateFormat")) . MISC::br() .
807 $input = base64_decode($this->session->getVar("style_runningTimeFormat"));
808 $pString .= TABLE::td(MISC::b($this->messages->text("style", "runningTimeFormat")) . MISC::br() .
815 $input = base64_decode($this->session->getVar("style_userMonth_$i"));
823 $pString .= TABLE::td($this->messages->text("style", "userMonths") . MISC::br() .
833 $td = MISC::p(MISC::b($this->messages->text("style", "dateRange")));
834 $input = base64_decode($this->session->getVar("style_dateRangeDelimit1"));
835 $td .= MISC::p(FORM::textInput($this->messages->text("style", "dateRangeDelimit1"),
837 $input = base64_decode($this->session->getVar("style_dateRangeDelimit2"));
838 $td .= MISC::p(FORM::textInput($this->messages->text("style", "dateRangeDelimit2"),
840 $input = base64_decode($this->session->getVar("style_dateRangeSameMonth"));
841 $example = array($this->messages->text("style", "dateRangeSameMonth1"),
842 $this->messages->text("style", "dateRangeSameMonth2"));
843 $td .= MISC::p(FORM::selectedBoxValue($this->messages->text("style", "dateRangeSameMonth"),
852 $generic = array("genericBook" => $this->messages->text("resourceType", "genericBook"),
853 "genericArticle" => $this->messages->text("resourceType", "genericArticle"),
854 "genericMisc" => $this->messages->text("resourceType", "genericMisc"));
867 $input = $this->session->issetVar($formElementName) ?
868 base64_decode($this->session->getVar($formElementName)) : "genericMisc";
869 $fallback = FORM::selectedBoxValue($this->messages->text("style", "fallback"),
876 $input = stripslashes(base64_decode($this->session->getVar($keyName)));
877 $pString .= TABLE::td(FORM::textareaInput($this->messages->text("resourceType", $key),
879 $this->messages->text("hint", "caseSensitive"));
881 $availableFields = join(', ', array_values($this->map->$key));
882 $pString .= TABLE::td(MISC::p(MISC::i($this->messages->text("style", "availableFields")) .
915 $this->map = $map;
916 $search = join('|', $this->map->$type);
1033 $this->badInput($this->errors->text("inputError", "invalid"), $this->errorDisplay);
1048 $this->errorDisplay = 'editInit';
1050 $this->errorDisplay = 'addInit';
1053 $this->map = new STYLEMAP();
1055 $this->utf8 = new UTF8();
1056 $types = array_keys($this->map->types);
1062 $fileString .= "<name>" . trim(stripslashes($this->vars['styleShortName'])) . "</name>";
1063 …$fileString .= "<description>" . htmlspecialchars(trim(stripslashes($this->vars['styleLongName'])))
1067 $fileString .= "<osbibVersion>$this->osbibVersion</osbibVersion>";
1088 if(isset($this->vars[$input]))
1093 htmlspecialchars(stripslashes($this->vars[$input])) . "</$elementName>";
1126 if(isset($this->vars[$input]))
1131 htmlspecialchars(stripslashes($this->vars[$input])) . "</$elementName>";
1139 $input = trim(stripslashes($this->vars[$type]));
1143 $fileString .= $this->arrayToXML($this->parseStringToArray($key, $input), $type);
1151 $dirName = OSBIB_STYLE_DIR . "/" . strtolower(trim($this->vars['styleShortName']));
1153 $this->badInput($error = $this->errors->text("file", "folder"), $this->errorDisplay);
1154 $fileName = $dirName . "/" . strtoupper(trim($this->vars['styleShortName'])) . ".xml";
1157 $this->badInput($this->errors->text("file", "write", ": $fileName"), $this->errorDisplay);
1158 if(!fputs($fp, $this->utf8->encodeUtf8($fileString)))
1159 $this->badInput($this->errors->text("file", "write", ": $fileName"), $this->errorDisplay);
1169 if(!isset($this->vars[$name]))
1172 $name = $this->vars[$name];
1179 $fileString .= $this->arrayToXML($value, $type);
1209 $this->writeSession($array);
1210 if(!trim($this->vars['styleShortName']))
1211 $error = $this->errors->text("inputError", "missing");
1213 $this->session->setVar("style_shortName", trim($this->vars['styleShortName']));
1214 if(preg_match("/\s/", trim($this->vars['styleShortName'])))
1215 $error = $this->errors->text("inputError", "invalid");
1216 else if(!trim($this->vars['styleLongName']))
1217 $error = $this->errors->text("inputError", "missing");
1218 else if(!trim($this->vars['cite_template']))
1219 $error = $this->errors->text("inputError", "missing");
1220 else if(!trim($this->vars['style_genericBook']))
1221 $error = $this->errors->text("inputError", "missing");
1222 else if(!trim($this->vars['style_genericArticle']))
1223 $error = $this->errors->text("inputError", "missing");
1224 else if(!trim($this->vars['style_genericMisc']))
1225 $error = $this->errors->text("inputError", "missing");
1228 if(!isset($this->vars[$input]))
1229 return $this->errors->text("inputError", "missing");
1233 if(($this->vars['style_primaryCreatorList'] == 1) &&
1234 (!trim($this->vars['style_primaryCreatorListLimit']) ||
1235 (!$this->vars['style_primaryCreatorListMore'])))
1236 $error = $this->errors->text("inputError", "missing");
1237 else if(($this->vars['style_primaryCreatorList'] == 1) &&
1238 (!is_numeric($this->vars['style_primaryCreatorListLimit']) ||
1239 !is_numeric($this->vars['style_primaryCreatorListMore'])))
1240 $error = $this->errors->text("inputError", "nan");
1241 else if(($this->vars['style_otherCreatorList'] == 1) &&
1242 (!trim($this->vars['style_otherCreatorListLimit']) ||
1243 (!$this->vars['style_otherCreatorListMore'])))
1244 $error = $this->errors->text("inputError", "missing");
1245 else if(($this->vars['style_otherCreatorList'] == 1) &&
1246 (!is_numeric($this->vars['style_otherCreatorListLimit']) ||
1247 !is_numeric($this->vars['style_otherCreatorListMore'])))
1248 $error = $this->errors->text("inputError", "nan");
1249 else if(($this->vars['cite_creatorList'] == 1) &&
1250 (!trim($this->vars['cite_creatorListLimit']) ||
1251 (!$this->vars['cite_creatorListMore'])))
1252 $error = $this->errors->text("inputError", "missing");
1253 else if(($this->vars['cite_creatorList'] == 1) &&
1254 (!is_numeric($this->vars['cite_creatorListLimit']) ||
1255 !is_numeric($this->vars['cite_creatorListMore'])))
1256 $error = $this->errors->text("inputError", "nan");
1257 else if(($this->vars['cite_creatorListSubsequent'] == 1) &&
1258 (!trim($this->vars['cite_creatorListSubsequentLimit']) ||
1259 (!$this->vars['cite_creatorListSubsequentMore'])))
1260 $error = $this->errors->text("inputError", "missing");
1261 else if(($this->vars['cite_creatorListSubsequent'] == 1) &&
1262 (!is_numeric($this->vars['cite_creatorListSubsequentLimit']) ||
1263 !is_numeric($this->vars['cite_creatorListSubsequentMore'])))
1264 $error = $this->errors->text("inputError", "nan");
1265 else if(($this->vars['style_editorSwitch'] == 1) &&
1266 !trim($this->vars['style_editorSwitchIfYes']))
1267 $error = $this->errors->text("inputError", "missing");
1268 else if(($this->vars['style_primaryCreatorRepeat'] == 2) &&
1269 !trim($this->vars['style_primaryCreatorRepeatString']))
1270 $error = $this->errors->text("inputError", "missing");
1271 else if($this->vars['style_monthFormat'] == 2)
1275 if(!trim($this->vars["style_userMonth_$i"]))
1276 $error = $this->errors->text("inputError", "missing");
1282 if(preg_match("/\s/", trim($this->vars['styleShortName'])))
1283 $error = $this->errors->text("inputError", "invalid");
1284 else if(array_key_exists(strtoupper(trim($this->vars['styleShortName'])), $this->styles))
1285 $error = $this->errors->text("inputError", "styleExists");
1289 if(!array_key_exists('editStyleFile', $this->vars))
1290 $error = $this->errors->text("inputError", "missing");
1302 $this->map = new STYLEMAP();
1303 $types = array_keys($this->map->types);
1304 if(trim($this->vars['styleLongName']))
1305 $this->session->setVar("style_longName", base64_encode(trim($this->vars['styleLongName'])));
1310 if(trim($this->vars[$type]))
1311 $this->session->setVar($type, base64_encode(trim($this->vars[$type])));
1316 $this->session->setVar($name, base64_encode(trim($this->vars[$name])));
1377 if(isset($this->vars[$input]))
1378 $this->session->setVar($input, base64_encode($this->vars[$input]));
1380 $this->session->delVar($input);
1387 new CLOSE($this->$method($error));