[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 #CMS - CMS Made Simple 3 #(c)2004 by Ted Kulp (wishy@users.sf.net) 4 #This project's homepage is: http://cmsmadesimple.sf.net 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: listhtmlblobs.php 3364 2006-08-22 16:45:00Z wishy $ 20 21 $CMS_ADMIN_PAGE=1; 22 23 require_once ("../include.php"); 24 //require_once("../lib/classes/class.htmlblob.inc.php"); 25 26 check_login(); 27 28 include_once ("header.php"); 29 30 if (isset($_GET["message"])) { 31 $message = preg_replace('/\</','',$_GET['message']); 32 echo '<div class="pagemcontainer"><p class="pagemessage">'.$message.'</p></div>'; 33 } 34 35 ?> 36 <div class="pagecontainer"> 37 <div class="pageoverflow"> 38 39 <?php 40 $userid = get_userid(); 41 42 global $gCms; 43 $gcbops =& $gCms->GetGlobalContentOperations(); 44 45 $modifyall = check_permission($userid, 'Modify Global Content Blocks'); 46 $htmlbloblist = $gcbops->LoadHtmlBlobs(); 47 $myblobs = $gcbops->AuthorBlobs($userid); 48 49 $page = 1; 50 if (isset($_GET['page'])) $page = $_GET['page']; 51 $limit = 20; 52 echo "<p class=\"pageshowrows\">".pagination($page, count($htmlbloblist), $limit)."</p>"; 53 echo $themeObject->ShowHeader('htmlblobs').'</div>'; 54 55 if ($htmlbloblist && count($htmlbloblist) > 0) { 56 echo "<table cellspacing=\"0\" class=\"pagetable\">\n"; 57 echo '<thead>'; 58 echo "<tr>\n"; 59 echo "<th>".lang('name')."</th>\n"; 60 echo "<th class=\"pageicon\"> </th>\n"; 61 echo "<th class=\"pageicon\"> </th>\n"; 62 echo "</tr>\n"; 63 echo '</thead>'; 64 echo '<tbody>'; 65 66 $currow = "row1"; 67 // construct true/false button images 68 $image_true = $themeObject->DisplayImage('icons/system/true.gif', lang('true'),'','','systemicon'); 69 $image_false = $themeObject->DisplayImage('icons/system/false.gif', lang('false'),'','','systemicon'); 70 71 $counter = 0; 72 foreach ($htmlbloblist as $onehtmlblob){ 73 if ($counter < $page*$limit && $counter >= ($page*$limit)-$limit) { 74 if ($modifyall || quick_check_authorship($onehtmlblob->id, $myblobs)) 75 { 76 echo "<tr class=\"$currow\" onmouseover=\"this.className='".$currow.'hover'."';\" onmouseout=\"this.className='".$currow."';\">\n"; 77 echo "<td><a href=\"edithtmlblob.php?htmlblob_id=".$onehtmlblob->id."\">".$onehtmlblob->name."</a></td>\n"; 78 echo "<td><a href=\"edithtmlblob.php?htmlblob_id=".$onehtmlblob->id."\">"; 79 echo $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'),'','','systemicon'); 80 echo "</a></td>\n"; 81 echo "<td><a href=\"deletehtmlblob.php?htmlblob_id=".$onehtmlblob->id."\" onclick=\"return confirm('".lang('deleteconfirm')."');\">"; 82 echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'),'','','systemicon'); 83 echo "</a></td>\n"; 84 echo "</tr>\n"; 85 86 ($currow=="row1"?$currow="row2":$currow="row1"); 87 } 88 } 89 $counter++; 90 } 91 92 echo '</tbody>'; 93 echo "</table>\n"; 94 } 95 96 #if ($add) { 97 if (check_permission($userid, 'Add Global Content Blocks')) 98 { 99 ?> 100 <div class="pageoptions"> 101 <p class="pageoptions"> 102 <a href="addhtmlblob.php"> 103 <?php 104 echo $themeObject->DisplayImage('icons/system/newobject.gif', lang('addhtmlblob'),'','','systemicon').'</a>'; 105 echo ' <a class="pageoptions" href="addhtmlblob.php">'.lang("addhtmlblob"); 106 ?> 107 </a> 108 </p> 109 </div> 110 <?php } ?> 111 </div> 112 <p class="pageback"><a class="pageback" href="<?php echo $themeObject->BackUrl(); ?>">« <?php echo lang('back')?></a></p> 113 114 <?php 115 #} 116 117 include_once ("footer.php"); 118 119 # vim:ts=4 sw=4 noet 120 ?>
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 |