Changeset 185
- Timestamp:
- 07/09/06 00:39:36 (3 years ago)
- Location:
- trunk/admin
- Files:
-
- 5 modified
-
index.php (modified) (30 diffs)
-
style/index.css (modified) (4 diffs)
-
style/logo_menu.png (modified) (previous)
-
style/page_bottom.png (modified) (previous)
-
style/page_top.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r175 r185 117 117 ?> 118 118 <div class="log_post"> 119 <div class="log_head"> 120 <span class="log_subject"> 121 <a href="?action=edit_post&id=<?=$row["id"]?>"><?=stripslashes($row["title"])?></a> 122 <? 123 $r =& $db->query(sprintf("SELECT COUNT(*) FROM articles WHERE categories_id = %d", $row["id"])); 124 if (PEAR::isError($r)) { 125 die($r->getMessage()); 126 } 127 $r->fetchInto($count); 128 ?> 129 <span class="log_cat">category: <?=$cats[$row["categories_id"]]?></span> 130 </span> 131 </div> 132 <div class="log_body"> 133 <span class="log_contents"> 119 <div class="log_post_head"> 120 <h1 class="log_post_h1"><a href="?action=edit_post&id=<?=$row["id"]?>"><?=stripslashes($row["title"])?></a></h1> 121 <? 122 $r =& $db->query(sprintf("SELECT COUNT(*) FROM articles WHERE categories_id = %d", $row["id"])); 123 if (PEAR::isError($r)) { 124 die($r->getMessage()); 125 } 126 $r->fetchInto($count); 127 ?> 128 <h2 class="log_post_h2">category: <?=$cats[$row["categories_id"]]?></h2> 129 </div> 130 <div class="log_post_body"> 131 <div class="log_post_normal"> 134 132 <?=stripslashes($row["body"])?> 135 </ span>136 </div> 137 <div class="log_ foot">138 <span class="log_ date">active: <?=(int)$row["active"]?></span>139 <span class="log_ author">public: <?=(int)$row["public"]?></span>140 <span class="log_ author">aside: <?=(int)$row["aside"]?></span>133 </div> 134 </div> 135 <div class="log_post_foot"> 136 <span class="log_post_author">active: <?=(int)$row["active"]?></span> 137 <span class="log_post_author">public: <?=(int)$row["public"]?></span> 138 <span class="log_post_author">aside: <?=(int)$row["aside"]?></span> 141 139 </div> 142 140 </div> … … 144 142 } 145 143 if ($options["top"]) { 146 echo "<a href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]-$options["limit"])."\">previous</a> ";144 echo "<a class=\"link_prev\" href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]-$options["limit"])."\">previous</a> "; 147 145 } 148 146 if (($options["top"] + $options["limit"]) > $counter) { … … 157 155 } 158 156 if (($options["top"]+$options["limit"]) < $counter) { 159 echo " <a href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]+$options["limit"])."\">next</a>";157 echo " <a class=\"link_next\" href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]+$options["limit"])."\">next</a>"; 160 158 } 161 159 echo "</span>"; … … 206 204 <input type="hidden" name="post[id]" value="<?=$post["id"]?>" /> 207 205 <div class="log_post"> 208 <div class="log_head"> 209 <span class="log_subject"> 210 <input type="text" id="title" name="post[title]" value="<?=stripslashes($post["title"])?>" /> 211 category: 212 <select name="post[categories_id]"> 206 <div class="log_post_head"> 207 <h1 class="log_post_h1"><input type="text" id="title" name="post[title]" value="<?=stripslashes($post["title"])?>" /></h1> 208 <h2 class="log_post_h2">category: 209 <select name="post[categories_id]"> 210 <? 211 foreach ($cats as $k=>$v) { 212 if ($post["categories_id"] == $k) { 213 $selected = "selected=\"selected\""; 214 } else { 215 $selected = ""; 216 } 217 ?><option value="<?=$k?>" <?=$selected?>><?=$v?></option><? 218 } 219 ?> 220 </select> 221 </h2> 222 </div> 223 <div class="log_post_body"> 224 <? 225 /* xinha stuff */ 226 ?> 227 <textarea id="editor_area" name="post[body]" rows="10" cols="50" style="width: 100%"><?=stripslashes($post["body"])?></textarea> 228 <? 229 230 echo "to limit this post on the frontpage, enter ##BREAKPOINT## in your post.<br />"; 231 echo "if this is not found, the frontpage article will be limited to 4000 characters"; 232 ?> 233 <br /><br /> 234 date: 235 <select name="post[day]"> 213 236 <? 214 foreach ($cats as $k=>$v) { 215 if ($post["categories_id"] == $k) { 216 $selected = "selected=\"selected\""; 217 } else { 218 $selected = ""; 219 } 220 ?><option value="<?=$k?>" <?=$selected?>><?=$v?></option><? 237 for ($i=1;$i<=31;$i++) { 238 ?><option value="<?=$i?>" <?=($i==date("d", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 221 239 } 222 240 ?> 223 </select> 224 </span> 225 </div> 226 <div class="log_body"> 227 <span class="log_contents"> 241 </select> 242 <select name="post[month]"> 228 243 <? 229 /* xinha stuff */ 244 for ($i=1;$i<=12;$i++) { 245 ?><option value="<?=$i?>" <?=($i==date("m", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 246 } 230 247 ?> 231 <textarea id="editor_area" name="post[body]" rows="10" cols="50" style="width: 100%"><?=stripslashes($post["body"])?></textarea> 248 </select> 249 <select name="post[year]"> 232 250 <? 233 234 echo "to limit this post on the frontpage, enter ##BREAKPOINT## in your post.<br />";235 echo "if this is not found, the frontpage article will be limited to 4000 characters";251 for ($i=date("Y")-5;$i<=date("Y")+1;$i++) { 252 ?><option value="<?=$i?>" <?=($i==date("Y", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 253 } 236 254 ?> 237 <br /><br /> 238 date: 239 <select name="post[day]"> 240 <? 241 for ($i=1;$i<=31;$i++) { 242 ?><option value="<?=$i?>" <?=($i==date("d", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 243 } 244 ?> 245 </select> 246 <select name="post[month]"> 247 <? 248 for ($i=1;$i<=12;$i++) { 249 ?><option value="<?=$i?>" <?=($i==date("m", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 250 } 251 ?> 252 </select> 253 <select name="post[year]"> 254 <? 255 for ($i=date("Y")-5;$i<=date("Y")+1;$i++) { 256 ?><option value="<?=$i?>" <?=($i==date("Y", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 257 } 258 ?> 259 </select> 260 <br /> 261 send trackback info to: 262 <input type="text" name="post[tb_uri]" value="<?=$post["tb_uri"]?>" size="50" /><br /> 263 <input type="checkbox" value="1" name="post[mail_comments]"<? if ($post["mail_comments"]) { echo " checked=\"checked\""; } ?> /> send comments as email to me. 264 </span> 255 </select> 256 <br /> 257 send trackback info to: 258 <input type="text" name="post[tb_uri]" value="<?=$post["tb_uri"]?>" size="50" /><br /> 259 <input type="checkbox" value="1" name="post[mail_comments]"<? if ($post["mail_comments"]) { echo " checked=\"checked\""; } ?> /> send comments as email to me.<br /> 265 260 <input type="submit" value="save" /> 266 261 <? if ($post["id"]) { ?> … … 270 265 <? } ?> 271 266 </div> 272 <div class="log_ foot">273 <span class="log_ date">active: <input type="checkbox" value="1" name="post[active]" <? if ($post["active"]) { echo "checked=\"checked\""; } ?> /></span>274 <span class="log_ author">public: <input type="checkbox" value="1" name="post[public]" <? if ($post["public"]) { echo "checked=\"checked\""; } ?> /></span>275 <span class="log_ author">aside: <input type="checkbox" value="1" name="post[aside]" <? if ($post["aside"]) { echo "checked=\"checked\""; } ?> /></span>276 <span class="log_ author">anoncomments: <input type="checkbox" value="1" name="post[allowanoncomments]" <? if ($post["allowanoncomments"]) { echo "checked=\"checked\""; } ?> /></span>267 <div class="log_post_foot"> 268 <span class="log_post_date">active: <input type="checkbox" value="1" name="post[active]" <? if ($post["active"]) { echo "checked=\"checked\""; } ?> /></span> 269 <span class="log_post_author">public: <input type="checkbox" value="1" name="post[public]" <? if ($post["public"]) { echo "checked=\"checked\""; } ?> /></span> 270 <span class="log_post_author">aside: <input type="checkbox" value="1" name="post[aside]" <? if ($post["aside"]) { echo "checked=\"checked\""; } ?> /></span> 271 <span class="log_post_author">anoncomments: <input type="checkbox" value="1" name="post[allowanoncomments]" <? if ($post["allowanoncomments"]) { echo "checked=\"checked\""; } ?> /></span> 277 272 </div> 278 273 </div> … … 401 396 ?> 402 397 <div class="log_post"> 403 <div class="log_head"> 404 <span class="log_subject"> 405 <a href="?action=edit_cat&id=<?=$row["id"]?>"><?=stripslashes($row["name"])?></a> 406 <? 407 $r =& $db->query(sprintf("SELECT COUNT(*) FROM articles WHERE categories_id = %d", $row["id"])); 408 if (PEAR::isError($r)) { 409 die($r->getMessage()); 410 } 411 $r->fetchInto($count); 412 ?> 413 <span class="log_cat">articles in this categorie: <?=$count[0]?></span> 414 </span> 415 </div> 416 <div class="log_body"> 417 <span class="log_contents"> 398 <div class="log_post_head"> 399 <h1 class="log_post_h1"><a href="?action=edit_cat&id=<?=$row["id"]?>"><?=stripslashes($row["name"])?></a></h1> 400 <? 401 $r =& $db->query(sprintf("SELECT COUNT(*) FROM articles WHERE categories_id = %d", $row["id"])); 402 if (PEAR::isError($r)) { 403 die($r->getMessage()); 404 } 405 $r->fetchInto($count); 406 ?> 407 <h2 class="log_post_h2">articles in this categorie: <?=$count[0]?></h2> 408 </div> 409 <div class="log_post_body"> 410 <div class="log_post_normal"> 418 411 <?=nl2br(stripslashes($row["desc"]))?> 419 </ span>420 </div> 421 <div class="log_ foot">422 <span class="log_ date">active: <?=$row["active"]?></span>423 <span class="log_ author">public: <?=$row["public"]?></span>412 </div> 413 </div> 414 <div class="log_post_foot"> 415 <span class="log_post_date">active: <?=$row["active"]?></span> 416 <span class="log_post_author">public: <?=$row["public"]?></span> 424 417 </div> 425 418 </div> … … 451 444 <input type="hidden" name="cat[id]" value="<?=$cat["id"]?>" /> 452 445 <div class="log_post"> 453 <div class="log_head"> 454 <span class="log_subject"> 455 <input type="text" name="cat[name]" value="<?=stripslashes($cat["name"])?>" /> 456 <? 457 $r =& $db->query(sprintf("SELECT COUNT(*) FROM articles WHERE categories_id = %d", $cat["id"])); 458 if (PEAR::isError($r)) { 459 die($r->getMessage()); 460 } 461 $r->fetchInto($count); 462 ?> 463 <span class="log_cat">articles in this categorie: <?=$count[0]?></span> 464 </span> 465 </div> 466 <div class="log_body"> 467 <span class="log_contents"> 468 <textarea name="cat[description]" style="width: 200px; height: 100px;"><?=stripslashes($cat["desc"])?></textarea> 469 </span> 446 <div class="log_post_head"> 447 <h1 class="log_post_h1"><input type="text" name="cat[name]" value="<?=stripslashes($cat["name"])?>" /></h1> 448 <? 449 $r =& $db->query(sprintf("SELECT COUNT(*) FROM articles WHERE categories_id = %d", $cat["id"])); 450 if (PEAR::isError($r)) { 451 die($r->getMessage()); 452 } 453 $r->fetchInto($count); 454 ?> 455 <h2 class="log_post_h2">articles in this categorie: <?=$count[0]?></h2> 456 </div> 457 <div class="log_post_body"> 458 <textarea name="cat[description]" style="width: 200px; height: 100px;"><?=stripslashes($cat["desc"])?></textarea><br /> 470 459 <input type="submit" value="save" /> 471 460 <input type="button" value="cancel" onClick="document.forms.category.action.value='show_cats';document.forms.category.submit();" /> … … 474 463 <? } ?> 475 464 </div> 476 <div class="log_ foot">477 <span class="log_ date">active: <input type="checkbox" value="1" name="cat[active]" <? if ($cat["active"]) { echo "checked=\"checked\""; } ?> /></span>478 <span class="log_ author">public: <input type="checkbox" value="1" name="cat[public]" <? if ($cat["public"]) { echo "checked=\"checked\""; } ?> /></span>465 <div class="log_post_foot"> 466 <span class="log_post_date">active: <input type="checkbox" value="1" name="cat[active]" <? if ($cat["active"]) { echo "checked=\"checked\""; } ?> /></span> 467 <span class="log_post_author">public: <input type="checkbox" value="1" name="cat[public]" <? if ($cat["public"]) { echo "checked=\"checked\""; } ?> /></span> 479 468 </div> 480 469 </div> … … 539 528 ?> 540 529 <div class="log_post"> 541 <div class="log_head"> 542 <span class="log_subject"> 543 <a href="?action=edit_acro&id=<?=$row["id"]?>"><?=stripslashes($row["acronym"])?></a> 544 </span> 545 </div> 546 <div class="log_body"> 547 <span class="log_contents"> 530 <div class="log_post_head"> 531 <h1 class="log_post_h1"><a href="?action=edit_acro&id=<?=$row["id"]?>"><?=stripslashes($row["acronym"])?></a></h1> 532 </div> 533 <div class="log_post_body"> 534 <div class="log_post_normal"> 548 535 <?=stripslashes($row["description"])?> 549 </ span>550 </div> 551 <div class="log_ foot">536 </div> 537 </div> 538 <div class="log_post_foot"> 552 539 </div> 553 540 </div> … … 577 564 <input type="hidden" name="acro[id]" value="<?=$acro["id"]?>" /> 578 565 <div class="log_post"> 579 <div class="log_head"> 580 <span class="log_subject"> 581 <input type="text" name="acro[acronym]" value="<?=stripslashes($acro["acronym"])?>" /> 582 </span> 583 </div> 584 <div class="log_body"> 585 <span class="log_contents"> 586 <input type="text" name="acro[description]" value="<?=stripslashes($acro["description"])?>" style="width: 500px;" /> 587 </span> 566 <div class="log_post_head"> 567 <h1 class="log_post_h1"><input type="text" name="acro[acronym]" value="<?=stripslashes($acro["acronym"])?>" /></h1> 568 </div> 569 <div class="log_post_body"> 570 <input type="text" name="acro[description]" value="<?=stripslashes($acro["description"])?>" style="width: 500px;" /><br /> 588 571 <input type="submit" value="save" /> 589 572 <? if ($id) { ?> … … 593 576 <? } ?> 594 577 </div> 595 <div class="log_ foot">578 <div class="log_postfoot"> 596 579 </div> 597 580 </div> … … 652 635 ?> 653 636 <div class="log_post"> 654 <div class="log_head"> 655 <span class="log_subject"> 656 657 <a href="?action=edit_author&id=<?=$row["id"]?>"> 658 <?=stripslashes($row["fullname"])?> 659 <? if ($row["active"]) { ?> 660 (active) 661 <? } else { ?> 662 (inactive) 663 <? } ?> 664 </a> 665 <span class="log_cat"> 666 loginname: <?=stripslashes($row["login"])?> 667 </span> 668 </span> 669 </div> 670 <div class="log_foot"> 637 <div class="log_post_head"> 638 <h1 class="log_post_h1"> 639 <a href="?action=edit_author&id=<?=$row["id"]?>"> 640 <?=stripslashes($row["fullname"])?> 641 <? if ($row["active"]) { ?> 642 (active) 643 <? } else { ?> 644 (inactive) 645 <? } ?> 646 </a> 647 </h1> 648 <h2 class="log_post_h2">loginname: <?=stripslashes($row["login"])?></h2> 649 <br /> 650 </div> 651 <div class="log_post_foot"> 671 652 </div> 672 653 </div> … … 703 684 <input type="hidden" id="active" name="author[active]" value="<?=$author["active"]?>" /> 704 685 <div class="log_post"> 705 <div class="log_ head">706 < span class="log_subject">686 <div class="log_post_head"> 687 <h1 class="log_post_h1"> 707 688 <? if ($authorid) { ?> 708 <?=stripslashes($author["login"])?> 689 <?=stripslashes($author["login"])?> 709 690 <? } else { ?> 710 login: <input type="text" name="author[login]" value="<?=stripslashes($author["login"])?>" />691 login: <input type="text" name="author[login]" value="<?=stripslashes($author["login"])?>" /> 711 692 <? } ?> 712 </span> 713 </div> 714 <div class="log_body"> 715 <span class="log_contents"> 693 </h1> 694 <br /> 695 </div> 696 <div class="log_post_body"> 697 <div class="log_post_normal"> 716 698 <table border="0" cellspacing="0" cellpadding="0"><tr> 717 699 <td align="right">password:</td> … … 730 712 <td><input type="text" name="author[fullname]" value="<?=stripslashes($author["fullname"])?>" /></td> 731 713 </tr></table> 732 </ span>714 </div> 733 715 <input type="submit" value="save" /> 734 716 <? if ($authorid) { ?> … … 740 722 <? } ?> 741 723 </div> 742 <div class="log_ foot">724 <div class="log_post_foot"> 743 725 </div> 744 726 </div> … … 811 793 ?> 812 794 <div class="log_post"> 813 <div class="log_head"> 814 <span class="log_subject"> 815 795 <div class="log_post_head"> 796 <h1 class="log_post_h1"> 816 797 <a href="?action=edit_user&id=<?=$row["id"]?>"> 817 798 <?=stripslashes($row["realname"])?> … … 821 802 (inactive) 822 803 <? } ?> 823 </a> 824 <span class="log_cat"> 825 loginname: <?=stripslashes($row["username"])?> 826 </span> 827 </span> 828 </div> 829 <div class="log_foot"> 804 </a> 805 </h1> 806 <h2 class="log_post_h2"> 807 loginname: <?=stripslashes($row["username"])?> 808 </h2> 809 </div> 810 <br /> 811 <div class="log_post_foot"> 830 812 </div> 831 813 </div> … … 863 845 <input type="hidden" id="active" name="user[active]" value="<?=$user["active"]?>" /> 864 846 <div class="log_post"> 865 <div class="log_ head">866 < span class="log_subject">847 <div class="log_post_head"> 848 <h1 class="log_post_h1"> 867 849 <? if ($userid) { ?> 868 <?=stripslashes($user["username"])?> 850 <?=stripslashes($user["username"])?> 869 851 <? } else { ?> 870 login: <input type="te
