Changeset 185

Show
Ignore:
Timestamp:
07/09/06 00:39:36 (3 years ago)
Author:
michiel
Message:

port admin interface to the new style as well.
Now our admin interface is web2.0 too ;)
time to get mvblog 2.0 codename web2.0 in objects

Location:
trunk/admin
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r175 r185  
    117117                ?> 
    118118                <div class="log_post"> 
    119                         <div class="log_head"> 
    120                                 <span class="log_subject"> 
    121                                         &nbsp;&nbsp;<a href="?action=edit_post&amp;id=<?=$row["id"]?>"><?=stripslashes($row["title"])?></a>&nbsp;&nbsp; 
    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&amp;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"> 
    134132                                        <?=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> 
    141139                        </div> 
    142140                </div> 
     
    144142        } 
    145143        if ($options["top"]) { 
    146                 echo "<a href=\"index.php?action=show_posts&amp;options[month]=".(int)$options["month"]."&amp;options[year]=".(int)$options["year"]."&amp;options[top]=".($options["top"]-$options["limit"])."\">previous</a> "; 
     144                echo "<a class=\"link_prev\" href=\"index.php?action=show_posts&amp;options[month]=".(int)$options["month"]."&amp;options[year]=".(int)$options["year"]."&amp;options[top]=".($options["top"]-$options["limit"])."\">previous</a> "; 
    147145        } 
    148146        if (($options["top"] + $options["limit"]) > $counter) { 
     
    157155        } 
    158156        if (($options["top"]+$options["limit"]) < $counter) { 
    159                 echo " <a href=\"index.php?action=show_posts&amp;options[month]=".(int)$options["month"]."&amp;options[year]=".(int)$options["year"]."&amp;options[top]=".($options["top"]+$options["limit"])."\">next</a>"; 
     157                echo " <a class=\"link_next\" href=\"index.php?action=show_posts&amp;options[month]=".(int)$options["month"]."&amp;options[year]=".(int)$options["year"]."&amp;options[top]=".($options["top"]+$options["limit"])."\">next</a>"; 
    160158        } 
    161159        echo "</span>"; 
     
    206204        <input type="hidden" name="post[id]" value="<?=$post["id"]?>" /> 
    207205        <div class="log_post"> 
    208                 <div class="log_head"> 
    209                         <span class="log_subject"> 
    210                                 &nbsp;&nbsp;<input type="text" id="title" name="post[title]" value="<?=stripslashes($post["title"])?>" />&nbsp;&nbsp; 
    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]"> 
    213236                                <? 
    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><? 
    221239                                } 
    222240                                ?> 
    223                                 </select> 
    224                         </span> 
    225                 </div> 
    226                 <div class="log_body"> 
    227                         <span class="log_contents"> 
     241                        </select> 
     242                        <select name="post[month]"> 
    228243                                <? 
    229                                 /* xinha stuff */ 
     244                                for ($i=1;$i<=12;$i++) { 
     245                                        ?><option value="<?=$i?>" <?=($i==date("m", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
     246                                } 
    230247                                ?> 
    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]"> 
    232250                                <? 
    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                                } 
    236254                                ?> 
    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\""; } ?> />&nbsp;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\""; } ?> />&nbsp;send comments as email to me.<br /> 
    265260                        <input type="submit" value="save" /> 
    266261                        <? if ($post["id"]) { ?> 
     
    270265                        <? } ?> 
    271266                </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> 
    277272                </div> 
    278273        </div> 
     
    401396                ?> 
    402397                <div class="log_post"> 
    403                         <div class="log_head"> 
    404                                 <span class="log_subject"> 
    405                                         &nbsp;&nbsp;<a href="?action=edit_cat&amp;id=<?=$row["id"]?>"><?=stripslashes($row["name"])?></a>&nbsp;&nbsp; 
    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&amp;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"> 
    418411                                        <?=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> 
    424417                        </div> 
    425418                </div> 
     
    451444        <input type="hidden" name="cat[id]" value="<?=$cat["id"]?>" /> 
    452445        <div class="log_post"> 
    453                 <div class="log_head"> 
    454                         <span class="log_subject"> 
    455                                 &nbsp;&nbsp;<input type="text" name="cat[name]" value="<?=stripslashes($cat["name"])?>" />&nbsp;&nbsp; 
    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 /> 
    470459                        <input type="submit" value="save" /> 
    471460                        <input type="button" value="cancel" onClick="document.forms.category.action.value='show_cats';document.forms.category.submit();" /> 
     
    474463                        <? } ?> 
    475464                </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> 
    479468                </div> 
    480469        </div> 
     
    539528                ?> 
    540529                <div class="log_post"> 
    541                         <div class="log_head"> 
    542                                 <span class="log_subject"> 
    543                                         &nbsp;&nbsp;<a href="?action=edit_acro&amp;id=<?=$row["id"]?>"><?=stripslashes($row["acronym"])?></a>&nbsp;&nbsp; 
    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&amp;id=<?=$row["id"]?>"><?=stripslashes($row["acronym"])?></a></h1> 
     532                        </div> 
     533                        <div class="log_post_body"> 
     534                                <div class="log_post_normal"> 
    548535                                        <?=stripslashes($row["description"])?> 
    549                                 </span> 
    550                         </div> 
    551                         <div class="log_foot"> 
     536                                </div> 
     537                        </div> 
     538                        <div class="log_post_foot"> 
    552539                        </div> 
    553540                </div> 
     
    577564        <input type="hidden" name="acro[id]" value="<?=$acro["id"]?>" /> 
    578565        <div class="log_post"> 
    579                 <div class="log_head"> 
    580                         <span class="log_subject"> 
    581                                 &nbsp;&nbsp;<input type="text" name="acro[acronym]" value="<?=stripslashes($acro["acronym"])?>" />&nbsp;&nbsp; 
    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 /> 
    588571                        <input type="submit" value="save" /> 
    589572                        <? if ($id) { ?> 
     
    593576                        <? } ?> 
    594577                </div> 
    595                 <div class="log_foot"> 
     578                <div class="log_postfoot"> 
    596579                </div> 
    597580        </div> 
     
    652635                ?> 
    653636                <div class="log_post"> 
    654                         <div class="log_head"> 
    655                                 <span class="log_subject"> 
    656                                         &nbsp;&nbsp; 
    657                                         <a href="?action=edit_author&amp;id=<?=$row["id"]?>"> 
    658                                         <?=stripslashes($row["fullname"])?> 
    659                                         <? if ($row["active"]) { ?> 
    660                                                 (active) 
    661                                         <? } else { ?> 
    662                                                 (inactive) 
    663                                         <? } ?> 
    664                                         </a>&nbsp;&nbsp; 
    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&amp;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"> 
    671652                        </div> 
    672653                </div> 
     
    703684        <input type="hidden" id="active" name="author[active]" value="<?=$author["active"]?>" /> 
    704685        <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"> 
    707688                                <? if ($authorid) { ?> 
    708                                         &nbsp;&nbsp;<?=stripslashes($author["login"])?>&nbsp;&nbsp; 
     689                                        <?=stripslashes($author["login"])?> 
    709690                                <? } else { ?> 
    710                                         &nbsp;&nbsp;login: <input type="text" name="author[login]" value="<?=stripslashes($author["login"])?>" /> 
     691                                        login: <input type="text" name="author[login]" value="<?=stripslashes($author["login"])?>" /> 
    711692                                <? } ?> 
    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"> 
    716698                                <table border="0" cellspacing="0" cellpadding="0"><tr> 
    717699                                        <td align="right">password:</td> 
     
    730712                                        <td><input type="text" name="author[fullname]" value="<?=stripslashes($author["fullname"])?>" /></td> 
    731713                                </tr></table> 
    732                         </span> 
     714                        </div> 
    733715                        <input type="submit" value="save" /> 
    734716                        <? if ($authorid) { ?> 
     
    740722                        <? } ?> 
    741723                </div> 
    742                 <div class="log_foot"> 
     724                <div class="log_post_foot"> 
    743725                </div> 
    744726        </div> 
     
    811793                ?> 
    812794                <div class="log_post"> 
    813                         <div class="log_head"> 
    814                                 <span class="log_subject"> 
    815                                         &nbsp;&nbsp; 
     795                        <div class="log_post_head"> 
     796                                <h1 class="log_post_h1"> 
    816797                                        <a href="?action=edit_user&amp;id=<?=$row["id"]?>"> 
    817798                                        <?=stripslashes($row["realname"])?> 
     
    821802                                                (inactive) 
    822803                                        <? } ?> 
    823                                         </a>&nbsp;&nbsp; 
    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"> 
    830812                        </div> 
    831813                </div> 
     
    863845        <input type="hidden" id="active" name="user[active]" value="<?=$user["active"]?>" /> 
    864846        <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"> 
    867849                                <? if ($userid) { ?> 
    868                                         &nbsp;&nbsp;<?=stripslashes($user["username"])?>&nbsp;&nbsp; 
     850                                        <?=stripslashes($user["username"])?> 
    869851                                <? } else { ?> 
    870                                         &nbsp;&nbsp;login: <input type="te