- Timestamp:
- 07/16/06 17:19:46 (2 years ago)
- Location:
- branches/class-rewrite
- Files:
-
- 2 modified
-
admin/index.php (modified) (1 diff)
-
common/admin.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/class-rewrite/admin/index.php
r190 r192 15 15 <div id="if_menu"> 16 16 <a class="if_menu_item" href="../index.php">Site</a> 17 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_cats") { echo "_act"; } ?>" href="./index.php?action=show_cats">categories</a> 18 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_authors") { echo "_act"; } ?>" href="./index.php?action=show_authors">authors</a> 19 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_users") { echo "_act"; } ?>" href="./index.php?action=show_users">users</a> 20 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_posts") { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a> 21 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_comments") { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a> 22 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_acro") { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a> 23 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_settings") { echo "_act"; } ?>" href="./index.php?action=show_settings">blogsettings</a> 24 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_menuitems") { echo "_act"; } ?>" href="./index.php?action=show_menuitems">menuitems</a> 17 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_cats") { echo "_act"; } ?>" href="./index.php?action=show_cats">categories</a> 18 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_authors") { echo "_act"; } ?>" href="./index.php?action=show_authors">authors</a> 19 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_users") { echo "_act"; } ?>" href="./index.php?action=show_users">users</a> 20 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_posts") { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a> 21 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_comments") { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a> 22 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_acro") { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a> 23 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_settings") { echo "_act"; } ?>" href="./index.php?action=show_settings">blogsettings</a> 24 <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_menuitems") { echo "_act"; } ?>" href="./index.php?action=show_menuitems">menuitems</a> 25 25 <a class="if_menu_item" href="./index.php?action=logout">logout</a> 26 26 </div> -
branches/class-rewrite/common/admin.php
r191 r192 507 507 die($res->getMessage()); 508 508 } 509 ?><a href="./index.php?action=edit_author&id=0">create new</a><?php509 echo "<div class=\"log_post\"></div>"; 510 510 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 511 511 ?> … … 1047 1047 <div class="log_post_head"> 1048 1048 <h1 class="log_post_h1"> 1049 <? =htmlspecialchars(stripslashes($row["title"]))?> (<?=$articles[$row["articles_id"]]?>)1049 <?php echo htmlspecialchars(stripslashes($row["title"])); ?> (<?php echo $articles[$row["articles_id"]]; ?>) 1050 1050 </h1><br /> 1051 <h2 class="log_post_h2">name: <? =stripslashes(htmlspecialchars($row["name"]))?> ip: <?=$row["ip"]?></h2>1052 <h2 class="log_post_h2">website: <? =stripslashes(htmlspecialchars($row["website"]))?> email: <?=stripslashes(htmlspecialchars($row["email"]))?></h2>1051 <h2 class="log_post_h2">name: <?php echo stripslashes(htmlspecialchars($row["name"])); ?> ip: <?php echo $row["ip"]; ?></h2> 1052 <h2 class="log_post_h2">website: <?php echo stripslashes(htmlspecialchars($row["website"])); ?> email: <?php echo stripslashes(htmlspecialchars($row["email"])); ?></h2> 1053 1053 </div> 1054 1054 <div class="log_post_body"> 1055 <div class="log_post_normal"><? =stripslashes(htmlspecialchars($row["comment"]))?></div>1055 <div class="log_post_normal"><?php echo stripslashes(htmlspecialchars($row["comment"])); ?></div> 1056 1056 </div> 1057 1057 <div class="log_post_foot"> 1058 <!-- not yet implemented 1059 <? if (trim($row["ip"])) { ?><a href="index.php?action=blacklist_ip&commentid=<?=$row["id"]?>">blacklist ip</a><? } ?> 1060 --> 1061 <? if (!$row["deleted"]) { ?> 1062 <a href="index.php?action=delete_comment&id=<?=$row["id"]?>">delete</a> 1063 <? } else { ?> 1064 <a href="index.php?action=recover_comment&id=<?=$row["id"]?>">recover</a> 1065 <? } ?> 1066 </div> 1067 </div> 1068 <? 1069 } 1070 if ($options["top"]) { 1058 <?php if (!$row["deleted"]) { ?> 1059 <a href="index.php?action=delete_comment&id=<?php echo $row["id"]; ?>">delete</a> 1060 <?php } else { ?> 1061 <a href="index.php?action=recover_comment&id=<?php echo $row["id"]; ?>">recover</a> 1062 <?php } ?> 1063 </div> 1064 </div> 1065 <?php 1066 } 1067 if ($options["top"]) 1071 1068 echo "<a class=\"link_prev\" href=\"index.php?action=show_comments&options[top]=".($options["top"]-$options["limit"])."\">previous</a> "; 1072 } 1073 if (($options["top"] + $options["limit"]) > $counter) { 1069 if (($options["top"] + $options["limit"]) > $counter) 1074 1070 $end = $counter; 1075 } else {1071 else 1076 1072 $end = ($options["top"]+$options["limit"]); 1077 } 1078 if ($counter == 0) { 1073 if ($counter == 0) 1079 1074 echo "<span class=\"log_cat\">no comments"; 1080 } else {1075 else 1081 1076 echo "<span class=\"log_cat\">showing ".($options["top"]+1)." to ".$end." of ".$counter." total comments"; 1082 } 1083 if (($options["top"]+$options["limit"]) < $counter) { 1077 if (($options["top"]+$options["limit"]) < $counter) 1084 1078 echo " <a class=\"link_next\" href=\"index.php?action=show_comments&options[top]=".($options["top"]+$options["limit"])."\">next</a>"; 1085 }1086 1079 echo "</span>"; 1087 1080 } … … 1124 1117 <table border="0" cellspacing="0" cellpadding="0"><tr> 1125 1118 <td style="vertical-align: top;">blog title</td> 1126 <td><input type="text" style="width: 200px;" name="settings[blogtitle]" value="<? =stripslashes($settings["blogtitle"])?>" /></td>1119 <td><input type="text" style="width: 200px;" name="settings[blogtitle]" value="<?php echo stripslashes($settings["blogtitle"]); ?>" /></td> 1127 1120 </tr><tr> 1128 1121 <td style="vertical-align: top;">blog/meta description:</td> 1129 <td><textarea name="settings[blogdescription]" style="width: 200px; height: 100px;"><? =stripslashes($settings["blogdescription"])?></textarea></td>1122 <td><textarea name="settings[blogdescription]" style="width: 200px; height: 100px;"><?php echo stripslashes($settings["blogdescription"]); ?></textarea></td> 1130 1123 </tr><tr> 1131 1124 <td style="vertical-align: top;">meta keywords</td> 1132 1125 <td> 1133 <textarea name="settings[blogkeywords]" style="width: 200px; height: 100px;"><? =stripslashes($settings["blogkeywords"])?></textarea>1126 <textarea name="settings[blogkeywords]" style="width: 200px; height: 100px;"><?php echo stripslashes($settings["blogkeywords"]); ?></textarea> 1134 1127 </td> 1135 1128 </tr><tr> … … 1137 1130 <td> 1138 1131 <select name="settings[postsperpage]"> 1139 <option value="10"<? if ($settings["postsperpage"] == 10) { echo " SELECTED"; } ?>>10</option>1140 <option value="20"<? if ($settings["postsperpage"] == 20) { echo " SELECTED"; } ?>>20</option>1141 <option value="50"<? if ($settings["postsperpage"] == 50) { echo " SELECTED"; } ?>>50</option>1142 <option value="75"<? if ($settings["postsperpage"] == 75) { echo " SELECTED"; } ?>>75</option>1143 <option value="100"<? if ($settings["postsperpage"] == 100) { echo " SELECTED"; } ?>>100</option>1132 <option value="10"<?php if ($settings["postsperpage"] == 10) { echo " SELECTED"; } ?>>10</option> 1133 <option value="20"<?php if ($settings["postsperpage"] == 20) { echo " SELECTED"; } ?>>20</option> 1134 <option value="50"<?php if ($settings["postsperpage"] == 50) { echo " SELECTED"; } ?>>50</option> 1135 <option value="75"<?php if ($settings["postsperpage"] == 75) { echo " SELECTED"; } ?>>75</option> 1136 <option value="100"<?php if ($settings["postsperpage"] == 100) { echo " SELECTED"; } ?>>100</option> 1144 1137 </select> 1145 1138 </td> … … 1149 1142 <select name="settings[allowanoncomments]"> 1150 1143 <option value="0">no</option> 1151 <option value="1"<? if ($settings["allowanoncomments"] == 1) { echo " SELECTED"; } ?>>yes</option>1144 <option value="1"<?php if ($settings["allowanoncomments"] == 1) { echo " SELECTED"; } ?>>yes</option> 1152 1145 </select> 1153 1146 </td> … … 1164 1157 </div> 1165 1158 </div> 1166 <? 1159 <?php 1167 1160 } 1168 1161 /* }}} */ … … 1228 1221 <form name="settings" id="settingsform" method="post" action="index.php"> 1229 1222 <input type="hidden" name="action" value="save_menuitems" /> 1230 <? 1223 <?php 1231 1224 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 1232 1225 ?> 1233 1226 <table border="0" cellspacing="1" cellpadding="0"><tr> 1234 1227 <td>name</td> 1235 <td><input style="width: 300px;" type="text" name="link[<? =$row["id"]?>][linktitle]" value="<?=stripslashes($row["linktitle"])?>" /></td>1228 <td><input style="width: 300px;" type="text" name="link[<?php echo $row["id"]; ?>][linktitle]" value="<?php echo stripslashes($row["linktitle"]); ?>" /></td> 1236 1229 </tr><tr> 1237 1230 <td>link</td> 1238 <td><input style="width: 300px;" type="text" name="link[<? =$row["id"]?>][url]" value="<?=stripslashes($row["url"])?>" /></td>1231 <td><input style="width: 300px;" type="text" name="link[<?php echo $row["id"]; ?>][url]" value="<?php echo stripslashes($row["url"]); ?>" /></td> 1239 1232 </tr><tr> 1240 1233 <td>image</td> 1241 <td><input style="width: 300px;" type="text" name="link[<? =$row["id"]?>][image]" value="<?=stripslashes($row["image"])?>" /></td>1234 <td><input style="width: 300px;" type="text" name="link[<?php echo $row["id"]; ?>][image]" value="<?php echo stripslashes($row["image"]); ?>" /></td> 1242 1235 </tr><tr> 1243 1236 <td>pos</td> 1244 1237 <td> 1245 <input style="width: 30px;" type="text" name="link[<?=$row["id"]?>][sortorder]" value="<? =(int)$row["sortorder"]?>" /><br />1246 <input type="button" name="del" value="del" onclick="document.getElementById('state_<? =$row["id"]?>').value='delete'; document.getElementById('settingsform').submit();">1238 <input style="width: 30px;" type="text" name="link[<?=$row["id"]?>][sortorder]" value="<?php echo (int)$row["sortorder"]; ?>" /><br /> 1239 <input type="button" name="del" value="del" onclick="document.getElementById('state_<?php echo $row["id"]; ?>').value='delete'; document.getElementById('settingsform').submit();"> 1247 1240 </td> 1248 1241 </tr></table> 1249 <input type="hidden" id="state_<? =$row["id"]?>" name="link[<?=$row["id"]?>][state]" value="save" />1242 <input type="hidden" id="state_<?php echo $row["id"]; ?>" name="link[<?php echo $row["id"]; ?>][state]" value="save" /> 1250 1243 <hr> 1251 <? 1244 <?php 1252 1245 } 1253 1246 ?> … … 1264 1257 <td>pos</td> 1265 1258 <td> 1266 <input style="width: 30px;" type="text" name="link[0][sortorder]" value="<? =$nextsort?>" />1259 <input style="width: 30px;" type="text" name="link[0][sortorder]" value="<?php echo $nextsort; ?>" /> 1267 1260 </td> 1268 1261 </tr></table> 1269 <input type="hidden" id="state_<? =$row["id"]?>" name="link[0][state]" value="save" />1262 <input type="hidden" id="state_<?php echo $row["id"]; ?>" name="link[0][state]" value="save" /> 1270 1263 <hr> 1271 1264 <input type="submit" value="save all" /> … … 1274 1267 </div> 1275 1268 </div> 1276 <? 1269 <?php 1277 1270 } 1278 1271 /* }}} */ … … 1338 1331 } 1339 1332 1340 ?><a href="./index.php?action=edit_acro&id=0">create new</a><? 1333 ?><a href="./index.php?action=edit_acro&id=0">create new</a><?php 1341 1334 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 1342 1335 ?> 1343 1336 <div class="log_post"> 1344 1337 <div class="log_post_head"> 1345 <h1 class="log_post_h1"><a href="?action=edit_acro&id=<? =$row["id"]?>"><?=stripslashes($row["acronym"])?></a></h1>1338 <h1 class="log_post_h1"><a href="?action=edit_acro&id=<?php echo $row["id"]; ?>"><?php echo stripslashes($row["acronym"]); ?></a></h1> 1346 1339 </div> 1347 1340 <div class="log_post_body"> 1348 1341 <div class="log_post_normal"> 1349 <? =stripslashes($row["description"])?>1342 <?php echo stripslashes($row["description"]); ?> 1350 1343 </div> 1351 1344 </div> … … 1353 1346 </div> 1354 1347 </div> 1355 <? 1348 <?php 1356 1349 } 1357 1350 } … … 1375 1368 <form name="acronym" method="post" action="index.php"> 1376 1369 <input type="hidden" name="action" value="save_acro" /> 1377 <input type="hidden" name="acro[id]" value="<? =$acro["id"]?>" />1370 <input type="hidden" name="acro[id]" value="<?php echo $acro["id"]; ?>" /> 1378 1371 <div class="log_post"> 1379 1372 <div class="log_post_head"> 1380 <h1 class="log_post_h1"><input type="text" name="acro[acronym]" value="<? =stripslashes($acro["acronym"])?>" /></h1>1373 <h1 class="log_post_h1"><input type="text" name="acro[acronym]" value="<?php echo stripslashes($acro["acronym"]); ?>" /></h1> 1381 1374 </div> 1382 1375 <div class="log_post_body"> 1383 <input type="text" name="acro[description]" value="<? =stripslashes($acro["description"])?>" style="width: 500px;" /><br />1376 <input type="text" name="acro[description]" value="<?php echo stripslashes($acro["description"]); ?>" style="width: 500px;" /><br /> 1384 1377 <input type="submit" value="save" /> 1385 <? if ($id) { ?>1378 <?php if ($id) { ?> 1386 1379 <input type="button" value="delete" onClick="document.forms.acronym.action.value='delete_acro';document.forms.acronym.submit();" /> 1387 <? } else { ?>1380 <?php } else { ?> 1388 1381 <input type="button" value="cancel" onClick="document.forms.acronym.action.value='show_acro';document.forms.acronym.submit();" /> 1389 <? } ?>1382 <?php } ?> 1390 1383 </div> 1391 1384 <div class="log_postfoot"> … … 1393 1386 </div> 1394 1387 </form> 1395 <? 1388 <?php 1396 1389 } 1397 1390
