Changeset 36

Show
Ignore:
Timestamp:
05/22/03 01:28:49 (6 years ago)
Author:
mikelittle
Message:

Assorted changes, plus moved most of the links files to subdir wp-links.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/index.php

    r28 r36  
    2222<body> 
    2323<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1> 
    24  
    2524 
    2625<div id="content"> 
     
    106105    </ul> 
    107106 </li> 
    108  <?php include_once('links.php') ?> 
    109  <?php include_once('links.weblogs.com.php') ?> 
     107 <?php require_once('wp-links/links.php') ?> 
     108 <?php require_once('wp-links/links.weblogs.com.php') ?> 
    110109 <li>Links: 
    111110    <ul> 
  • trunk/linkcategories.php

    r21 r36  
    2828// ***************************************************************** 
    2929 
    30 include_once('links.config.php'); 
    31 include_once('links.php'); 
     30require_once('wp-links/links.config.php'); 
     31require_once('wp-links/links.php'); 
    3232 
    3333$title = "Link Categories"; 
     
    5353  { 
    5454      $standalone = 1; 
    55       include_once("./b2header.php"); 
     55      require_once("./b2header.php"); 
    5656 
    5757      if ($user_level < $minadminlevel) 
    5858          die ("Cheatin' uh ?"); 
    59      
     59 
    6060      $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); 
    6161      $auto_toggle = $HTTP_POST_VARS["auto_toggle"]; 
     
    6666      $query="INSERT INTO $tablelinkcategories (cat_id,cat_name, auto_toggle) VALUES ('0', '$cat_name', '$auto_toggle')"; 
    6767      $result=mysql_query($query) or die("Couldn't add category <b>$cat_name</b>".mysql_error()); 
    68        
     68 
    6969      header("Location: linkcategories.php"); 
    7070    break; 
     
    7373  { 
    7474    $standalone = 1; 
    75     include_once("./b2header.php"); 
    76     include_once("./links.php"); 
     75    require_once("./b2header.php"); 
    7776 
    7877    $cat_id = $HTTP_POST_VARS["cat_id"]; 
     
    8584    if ($user_level < $minadminlevel) 
    8685    die ("Cheatin' uh ?"); 
    87      
     86 
    8887    $query="DELETE FROM $tablelinkcategories WHERE cat_id=\"$cat_id\""; 
    8988    $result=mysql_query($query) or die("Couldn't delete link category <b>$cat_name</b>".mysql_error()); 
    90      
     89 
    9190    $query="UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'"; 
    9291    $result=mysql_query($query) or die("Couldn't reset category on links where category was <b>$cat_name</b>"); 
     
    9796  case "Edit": 
    9897  { 
    99     include_once ("./b2header.php"); 
    100     include_once("./links.php"); 
     98    require_once ("./b2header.php"); 
    10199    $cat_id = $HTTP_POST_VARS["cat_id"]; 
    102100    $cat_name=get_linkcatname($cat_id); 
    103     $cat_name=addslashes($cat_name); 
     101    //$cat_name=addslashes($cat_name); 
    104102    $auto_toggle=get_autotoggle($cat_id); 
    105103?> 
     
    113111      <input type="hidden" name="cat_id" value="<?php echo $HTTP_POST_VARS["cat_id"] ?>" /> 
    114112      <input type="text" name="cat_name" value="<?php echo $cat_name ?>" /><br /> 
    115       <input type="checkbox" name="auto_toggle" value="Y" <?php echo $auto_toggle = "Y" ? '"checked"' : ''; ?>/> auto-toggle?<br /> 
     113      <input type="checkbox" name="auto_toggle" value="Y" <?php echo $auto_toggle == "Y" ? '"checked"' : ''; ?>/> auto-toggle?<br /> 
    116114      <input type="submit" name="submit" value="Edit it !" class="search" /> 
    117115    </form> 
    118116  </p> 
     117  <p>Back to <a href="linkcategories.php">manage link categories</a></p> 
    119118  <?php echo $tablebottom; ?> 
    120119<?php 
     
    124123  { 
    125124    $standalone = 1; 
    126     include_once("./b2header.php"); 
     125    require_once("./b2header.php"); 
    127126 
    128127    if ($user_level < $minadminlevel) 
    129128      die ("Cheatin' uh ?"); 
    130      
     129 
    131130    $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); 
    132131    $cat_id=$HTTP_POST_VARS["cat_id"]; 
     
    135134    $query="UPDATE $tablelinkcategories SET cat_name='$cat_name', auto_toggle='$auto_toggle' WHERE cat_id=$cat_id"; 
    136135    $result=mysql_query($query) or die("Couldn't edit link category <b>$cat_name</b>: ".$query.mysql_error()); 
    137      
     136 
    138137    header("Location: linkcategories.php"); 
    139138    break; 
    140   } // end edit 
     139  } // end editedcat 
    141140  default: 
    142141  { 
    143142    $standalone=0; 
    144     include_once ("./b2header.php"); 
     143    require_once ("./b2header.php"); 
    145144    if ($user_level < $minadminlevel) { 
    146145      die("You have no right to edit the link categories for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)"); 
  • trunk/linkmanager.php

    r23 r36  
    2828// ***************************************************************** 
    2929 
    30 include_once('links.config.php'); 
    31 include_once("./links.php"); 
     30require_once('wp-links/links.config.php'); 
     31require_once("wp-links/links.php"); 
    3232 
    3333$title = "Manage Links"; 
     
    7676  { 
    7777    $standalone = 1; 
    78     include_once("./b2header.php"); 
     78    require_once("./b2header.php"); 
    7979 
    8080    $link_url = $HTTP_POST_VARS["linkurl"]; 
     
    125125 
    126126      $standalone = 1; 
    127       include_once("./b2header.php"); 
     127      require_once("./b2header.php"); 
    128128 
    129129      $link_id = $HTTP_POST_VARS["link_id"]; 
     
    168168  { 
    169169    $standalone = 1; 
    170     include_once("./b2header.php"); 
     170    require_once("./b2header.php"); 
    171171 
    172172    $link_id = $HTTP_POST_VARS["link_id"]; 
     
    193193  { 
    194194    $standalone=0; 
    195     include_once ("./b2header.php"); 
     195    require_once ("./b2header.php"); 
    196196    if ($user_level < $minadminlevel) { 
    197197      die("You have no right to edit the links for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)"); 
     
    327327    setcookie('links_show_cat_id', $links_show_cat_id, time()+600); 
    328328    $standalone=0; 
    329     include_once ("./b2header.php"); 
     329    require_once ("./b2header.php"); 
    330330    if ($user_level < $minadminlevel) { 
    331331      die("You have no right to edit the links for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");