[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 if (!isset($gCms)) exit; 3 4 5 if (isset($params['reindex'])) 6 { 7 $this->Reindex(); 8 echo '<div class="pagemcontainer"><p class="pagemessage">'.$this->Lang('reindexcomplete').'</p></div>'; 9 } 10 else if (isset($params['submit'])) 11 { 12 $this->SetPreference('stopwords', $params['stopwords']); 13 $this->SetPreference('searchtext', $params['searchtext']); 14 15 $curval = $this->GetPreference('usestemming', 'false'); 16 $newval = 'false'; 17 if (isset($params['usestemming'])) 18 $newval = 'true'; 19 20 if ($newval != $curval) 21 { 22 $this->SetPreference('usestemming', $newval); 23 $this->Reindex(); 24 echo '<div class="pagemcontainer"><p class="pagemessage">'.$this->Lang('reindexcomplete').'</p></div>'; 25 } 26 } 27 28 29 #The tabs 30 echo $this->StartTabHeaders(); 31 if (FALSE == empty($params['active_tab'])) 32 { 33 $tab = $params['active_tab']; 34 } else { 35 $tab = ''; 36 } 37 38 if ($this->CheckPermission('Modify Site Preferences')) 39 { 40 echo $this->SetTabHeader('options',$this->Lang('options'), ('options' == $tab)?true:false); 41 } 42 43 if ($this->CheckPermission('Modify Templates')) 44 { 45 echo $this->SetTabHeader('search_template',$this->Lang('searchtemplate'), ('search_template' == $tab)?true:false); 46 echo $this->SetTabHeader('result_template',$this->Lang('resulttemplate'), ('result_template' == $tab)?true:false); 47 } 48 49 echo $this->SetTabHeader('help',lang('help')); 50 echo $this->EndTabHeaders(); 51 52 53 54 #The content of the tabs 55 echo $this->StartTabContent(); 56 57 if ($this->CheckPermission('Modify Site Preferences')) 58 { 59 echo $this->StartTab('options', $params); 60 echo $this->CreateFormStart($id, 'defaultadmin'); 61 62 echo $this->CreateInputSubmit($id, 'reindex', $this->Lang('reindexallcontent')); 63 64 echo '<hr />'; 65 66 echo '<p>'.$this->Lang('stopwords').':<br />'.$this->CreateTextArea(false, $id, str_replace(array("\r", "\n"), '', $this->GetPreference('stopwords', $this->DefaultStopWords())), 'stopwords', '', '', '', '', '50', '6').'</p>'; 67 68 echo '<p>'.$this->Lang('usestemming').':' . $this->CreateInputCheckbox($id, 'usestemming', 'true', $this->GetPreference('usestemming', 'false')) . '</p>'; 69 70 echo '<p>'.$this->Lang('prompt_searchtext').':' . $this->CreateInputText($id,'searchtext', 71 $this->GetPreference('searchtext','')).'</p>'; 72 73 echo $this->CreateInputSubmit($id, 'submit', 'Submit'); 74 75 echo $this->CreateFormEnd(); 76 echo $this->EndTab(); 77 } 78 79 if( $this->CheckPermission( 'Modify Templates' ) ) 80 { 81 echo $this->StartTab('search_template', $params); 82 83 echo $this->CreateFormStart($id, 'updatesearchtemplate'); 84 85 echo '<p>'.$this->CreateTextArea(false, $id, $this->GetTemplate('displaysearch'), 'templatecontent', 'pagebigtextarea').'</p>'; 86 87 echo $this->CreateInputSubmit($id, 'submitbutton', $this->Lang('submit')); 88 echo $this->CreateInputSubmit($id, 'defaultsbutton', $this->Lang('sysdefaults'), '', '', $this->Lang('restoretodefaultsmsg')); 89 90 echo $this->CreateFormEnd(); 91 92 echo $this->EndTab(); 93 94 echo $this->StartTab('result_template', $params); 95 96 echo $this->CreateFormStart($id, 'updateresulttemplate'); 97 98 echo '<p>'.$this->CreateTextArea(false, $id, $this->GetTemplate('displayresult'), 'templatecontent2', 'pagebigtextarea').'</p>'; 99 100 echo $this->CreateInputSubmit($id, 'submitbutton', $this->Lang('submit')); 101 echo $this->CreateInputSubmit($id, 'defaultsbutton', $this->Lang('sysdefaults'), '', '', $this->Lang('restoretodefaultsmsg')); 102 103 echo $this->CreateFormEnd(); 104 105 echo $this->EndTab(); 106 } 107 108 echo $this->StartTab('help'); 109 echo $this->GetHelpPage(); 110 echo $this->EndTab(); 111 112 echo $this->EndTabContent(); 113 114 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |