[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 # CMS - CMS Made Simple 3 # (c)2004 by Ted Kulp (tedkulp@users.sf.net) 4 # This project's homepage is: http://cmsmadesimple.org 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; either version 2 of the License, or 9 # (at your option) any later version. 10 # 11 # This program is distributed in the hope that it will be useful, 12 # BUT withOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # GNU General Public License for more details. 15 # You should have received a copy of the GNU General Public License 16 # along with this program; if not, write to the Free Software 17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 # 19 #$Id: Separator.inc.php 3465 2006-10-09 14:04:47Z dittmann $ 20 21 class Separator extends ContentBase 22 { 23 24 function Separator() { 25 $this->ContentBase(); 26 $this->mProperties->SetAllowedPropertyNames(array()); 27 } 28 29 function FriendlyName() 30 { 31 return 'Separator'; 32 } 33 34 function SetProperties() 35 { 36 #Turn off caching 37 $this->mCachable = false; 38 } 39 40 function HasUsableLink() 41 { 42 return false; 43 } 44 45 function WantsChildren() 46 { 47 return false; 48 } 49 50 function FillParams($params) 51 { 52 if (isset($params)) 53 { 54 if (isset($params['parent_id'])) 55 { 56 if ($this->mParentId != $params['parent_id']) 57 { 58 $this->mHierarchy = ''; 59 $this->mItemOrder = -1; 60 } 61 $this->mParentId = $params['parent_id']; 62 } 63 if (isset($params['active'])) 64 { 65 $this->mActive = true; 66 } 67 else 68 { 69 $this->mActive = false; 70 } 71 if (isset($params['showinmenu'])) 72 { 73 $this->mShowInMenu = true; 74 } 75 else 76 { 77 $this->mShowInMenu = false; 78 } 79 } 80 } 81 82 function Show() 83 { 84 } 85 86 function EditAsArray($adding = false, $tab = 0, $showadmin = false) 87 { 88 global $gCms; 89 90 $ret = array(); 91 92 if (check_permission(get_userid(), 'Modify Page Structure') || ($adding == true && check_permission(get_userid(), 'Add Pages'))) 93 { 94 $contentops =& $gCms->GetContentOperations(); 95 $ret[] = array(lang('parent').':', $contentops->CreateHierarchyDropdown($this->mId, $this->mParentId)); 96 } 97 $ret[]= array(lang('active').':','<input type="checkbox" name="active"'.($this->mActive?' checked="checked"':'').' />'); 98 $ret[]= array(lang('showinmenu').':','<input type="checkbox" name="showinmenu"'.($this->mShowInMenu?' checked="checked"':'').' />'); 99 100 if (!$adding && $showadmin) 101 { 102 $userops =& $gCms->GetUserOperations(); 103 $ret[]= array(lang('owner').':', $userops->GenerateDropdown($this->Owner())); 104 } 105 106 if ($adding || $showadmin) 107 { 108 $ret[]= $this->ShowAdditionalEditors(); 109 } 110 111 return $ret; 112 } 113 114 function GetURL($rewrite = true) 115 { 116 return '#'; 117 } 118 function Save() 119 { 120 $this->mName = '--------'; 121 ContentBase::Save(); 122 } 123 124 } 125 126 # vim:ts=4 sw=4 noet 127 ?>
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 |