Changeset 56 for trunk/admin

Show
Ignore:
Timestamp:
01/15/06 00:27:18 (3 years ago)
Author:
michiel
Message:

new posts can have different date too.
add some extra years in the past.

Fixes #38 and #39

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r52 r56  
    228228                                echo "to limit this post on the frontpage, enter ##BREAKPOINT## in your post.<br />"; 
    229229                                echo "if this is not found, the frontpage article will be limited to 4000 characters"; 
    230                                 if ($post["id"]) { 
     230                                ?> 
     231                                <br /><br /> 
     232                                date: 
     233                                <select name="post[day]"> 
     234                                        <? 
     235                                        for ($i=1;$i<=31;$i++) { 
     236                                                ?><option value="<?=$i?>" <?=($i==date("d", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
     237                                        } 
    231238                                        ?> 
    232                                         <br /><br /> 
    233                                         date: 
    234                                         <select name="post[day]"> 
    235                                                 <? 
    236                                                 for ($i=1;$i<=31;$i++) { 
    237                                                         ?><option value="<?=$i?>" <?=($i==date("d", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
    238                                                 } 
    239                                                 ?> 
    240                                         </select> 
    241                                         <select name="post[month]"> 
    242                                                 <? 
    243                                                 for ($i=1;$i<=12;$i++) { 
    244                                                         ?><option value="<?=$i?>" <?=($i==date("m", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
    245                                                 } 
    246                                                 ?> 
    247                                         </select> 
    248                                         <select name="post[year]"> 
    249                                                 <? 
    250                                                 for ($i=date("Y")-1;$i<=date("Y")+1;$i++) { 
    251                                                         ?><option value="<?=$i?>" <?=($i==date("Y", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
    252                                                 } 
    253                                                 ?> 
    254                                         </select> 
    255                                 <? } ?> 
     239                                </select> 
     240                                <select name="post[month]"> 
     241                                        <? 
     242                                        for ($i=1;$i<=12;$i++) { 
     243                                                ?><option value="<?=$i?>" <?=($i==date("m", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
     244                                        } 
     245                                        ?> 
     246                                </select> 
     247                                <select name="post[year]"> 
     248                                        <? 
     249                                        for ($i=date("Y")-5;$i<=date("Y")+1;$i++) { 
     250                                                ?><option value="<?=$i?>" <?=($i==date("Y", $post["date"])?" SELECTED":"") ?>><?=$i?></option><? 
     251                                        } 
     252                                        ?> 
     253                                </select> 
    256254                                <br /> 
    257255      send trackback info to:  
     
    314312                $query .= ", ".$_SESSION["author_id"]; 
    315313                $query .= ", ".$post["categories_id"]; 
    316                 $query .= ", ".mktime(); 
     314                $query .= ", ".mktime(date("H"), date("i"), date("s"), $post["month"], $post["day"], $post["year"]); 
    317315                $query .= ($post["active"]=="on")?", 1":", 0"; 
    318316                $query .= ($post["public"]=="on")?", 1":", 0";