Changeset 192 for branches

Show
Ignore:
Timestamp:
07/16/06 17:19:46 (2 years ago)
Author:
michiel
Message:

be compatibe with php installs that dont support the short open tag

Location:
branches/class-rewrite
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/class-rewrite/admin/index.php

    r190 r192  
    1515                        <div id="if_menu"> 
    1616                                <a class="if_menu_item" href="../index.php">Site</a>&nbsp; 
    17                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_cats")      { echo "_act"; } ?>" href="./index.php?action=show_cats">categories</a>&nbsp; 
    18                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_authors")   { echo "_act"; } ?>" href="./index.php?action=show_authors">authors</a>&nbsp; 
    19                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_users")     { echo "_act"; } ?>" href="./index.php?action=show_users">users</a>&nbsp; 
    20                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_posts")     { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a>&nbsp; 
    21                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_comments")  { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a>&nbsp; 
    22                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_acro")      { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a>&nbsp; 
    23                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_settings")  { echo "_act"; } ?>" href="./index.php?action=show_settings">blogsettings</a>&nbsp; 
    24                                 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_menuitems") { echo "_act"; } ?>" href="./index.php?action=show_menuitems">menuitems</a>&nbsp; 
     17                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_cats")      { echo "_act"; } ?>" href="./index.php?action=show_cats">categories</a>&nbsp; 
     18                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_authors")   { echo "_act"; } ?>" href="./index.php?action=show_authors">authors</a>&nbsp; 
     19                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_users")     { echo "_act"; } ?>" href="./index.php?action=show_users">users</a>&nbsp; 
     20                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_posts")     { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a>&nbsp; 
     21                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_comments")  { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a>&nbsp; 
     22                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_acro")      { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a>&nbsp; 
     23                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_settings")  { echo "_act"; } ?>" href="./index.php?action=show_settings">blogsettings</a>&nbsp; 
     24                                <a class="if_menu_item<?php if ($_REQUEST["action"] == "show_menuitems") { echo "_act"; } ?>" href="./index.php?action=show_menuitems">menuitems</a>&nbsp; 
    2525                                <a class="if_menu_item" href="./index.php?action=logout">logout</a>&nbsp; 
    2626                        </div> 
  • branches/class-rewrite/common/admin.php

    r191 r192  
    507507                        die($res->getMessage()); 
    508508                } 
    509                 ?><a href="./index.php?action=edit_author&amp;id=0">create new</a><?php 
     509                echo "<div class=\"log_post\"></div>"; 
    510510                while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 
    511511                        ?> 
     
    10471047                                <div class="log_post_head"> 
    10481048                                        <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"]]; ?>) 
    10501050                                        </h1><br /> 
    1051                                         <h2 class="log_post_h2">name: <?=stripslashes(htmlspecialchars($row["name"]))?>&nbsp;ip: <?=$row["ip"]?></h2> 
    1052                                         <h2 class="log_post_h2">website: <?=stripslashes(htmlspecialchars($row["website"]))?>&nbsp;email: <?=stripslashes(htmlspecialchars($row["email"]))?></h2> 
     1051                                        <h2 class="log_post_h2">name: <?php echo stripslashes(htmlspecialchars($row["name"])); ?>&nbsp;ip: <?php echo $row["ip"]; ?></h2> 
     1052                                        <h2 class="log_post_h2">website: <?php echo stripslashes(htmlspecialchars($row["website"])); ?>&nbsp;email: <?php echo stripslashes(htmlspecialchars($row["email"])); ?></h2> 
    10531053                                </div> 
    10541054                                <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> 
    10561056                                </div> 
    10571057                                <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><? } ?>&nbsp;&nbsp; 
    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"]) 
    10711068                        echo "<a class=\"link_prev\" href=\"index.php?action=show_comments&amp;options[top]=".($options["top"]-$options["limit"])."\">previous</a> "; 
    1072                 } 
    1073                 if (($options["top"] + $options["limit"]) > $counter) { 
     1069                if (($options["top"] + $options["limit"]) > $counter) 
    10741070                        $end = $counter; 
    1075                 } else { 
     1071                else 
    10761072                        $end = ($options["top"]+$options["limit"]); 
    1077                 } 
    1078                 if ($counter == 0) { 
     1073                if ($counter == 0) 
    10791074                        echo "<span class=\"log_cat\">no comments"; 
    1080                 } else { 
     1075                else 
    10811076                        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) 
    10841078                        echo " <a class=\"link_next\" href=\"index.php?action=show_comments&amp;options[top]=".($options["top"]+$options["limit"])."\">next</a>"; 
    1085                 } 
    10861079                echo "</span>"; 
    10871080        } 
     
    11241117                                        <table border="0" cellspacing="0" cellpadding="0"><tr> 
    11251118                                                <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> 
    11271120                                        </tr><tr> 
    11281121                                                <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> 
    11301123                                        </tr><tr> 
    11311124                                                <td style="vertical-align: top;">meta keywords</td> 
    11321125                                                <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> 
    11341127                                                </td> 
    11351128                                        </tr><tr> 
     
    11371130                                                <td> 
    11381131                                                        <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> 
    11441137                                                        </select> 
    11451138                                                </td> 
     
    11491142                                                        <select name="settings[allowanoncomments]"> 
    11501143                                                                <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> 
    11521145                                                        </select> 
    11531146                                                </td> 
     
    11641157                        </div> 
    11651158                </div> 
    1166                 <? 
     1159                <?php 
    11671160        } 
    11681161        /* }}} */ 
     
    12281221                                        <form name="settings" id="settingsform" method="post" action="index.php"> 
    12291222                                        <input type="hidden" name="action" value="save_menuitems" /> 
    1230                                         <? 
     1223                                        <?php 
    12311224                                        while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 
    12321225                                                ?> 
    12331226                                                <table border="0" cellspacing="1" cellpadding="0"><tr> 
    12341227                                                        <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> 
    12361229                                                </tr><tr> 
    12371230                                                        <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> 
    12391232                                                </tr><tr> 
    12401233                                                        <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> 
    12421235                                                </tr><tr> 
    12431236                                                        <td>pos</td> 
    12441237                                                        <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();"> 
    12471240                                                        </td> 
    12481241                                                </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" /> 
    12501243                                                <hr> 
    1251                                                 <? 
     1244                                                <?php 
    12521245                                        } 
    12531246                                        ?> 
     
    12641257                                                <td>pos</td> 
    12651258                                                <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; ?>" /> 
    12671260                                                </td> 
    12681261                                        </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" /> 
    12701263                                        <hr> 
    12711264                                        <input type="submit" value="save all" /> 
     
    12741267                        </div> 
    12751268                </div> 
    1276                 <? 
     1269                <?php 
    12771270        } 
    12781271        /* }}} */ 
     
    13381331                } 
    13391332 
    1340                 ?><a href="./index.php?action=edit_acro&amp;id=0">create new</a><? 
     1333                ?><a href="./index.php?action=edit_acro&amp;id=0">create new</a><?php 
    13411334                while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 
    13421335                        ?> 
    13431336                        <div class="log_post"> 
    13441337                                <div class="log_post_head"> 
    1345                                         <h1 class="log_post_h1"><a href="?action=edit_acro&amp;id=<?=$row["id"]?>"><?=stripslashes($row["acronym"])?></a></h1> 
     1338                                        <h1 class="log_post_h1"><a href="?action=edit_acro&amp;id=<?php echo $row["id"]; ?>"><?php echo stripslashes($row["acronym"]); ?></a></h1> 
    13461339                                </div> 
    13471340                                <div class="log_post_body"> 
    13481341                                        <div class="log_post_normal"> 
    1349                                                 <?=stripslashes($row["description"])?> 
     1342                                                <?php echo stripslashes($row["description"]); ?> 
    13501343                                        </div> 
    13511344                                </div> 
     
    13531346                                </div> 
    13541347                        </div> 
    1355                         <? 
     1348                        <?php 
    13561349                } 
    13571350        } 
     
    13751368                <form name="acronym" method="post" action="index.php"> 
    13761369                <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"]; ?>" /> 
    13781371                <div class="log_post"> 
    13791372                        <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> 
    13811374                        </div> 
    13821375                        <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 /> 
    13841377                                <input type="submit" value="save" /> 
    1385                                 <? if ($id) { ?> 
     1378                                <?php if ($id) { ?> 
    13861379                                        <input type="button" value="delete" onClick="document.forms.acronym.action.value='delete_acro';document.forms.acronym.submit();" /> 
    1387                                 <? } else { ?> 
     1380                                <?php } else { ?> 
    13881381                                        <input type="button" value="cancel" onClick="document.forms.acronym.action.value='show_acro';document.forms.acronym.submit();" /> 
    1389                                 <? } ?> 
     1382                                <?php } ?> 
    13901383                        </div> 
    13911384                        <div class="log_postfoot"> 
     
    13931386                </div> 
    13941387                </form> 
    1395                 <? 
     1388                <?php 
    13961389        } 
    13971390