Absolut Engine PHP Cross Reference Web Portal Systems

Source: /admin/managerrelated.php - 126 lines - 5294 bytes - Summary - Text - Print

   1  <?
   2  @include ("coreclass.php");
   3  $ae=new CArticles();
   4  $ae->RequestVariables();
   5  $ae->EngineInitialize();
   6  $ae->UserVerifySession();
   7  $ae->UserVerifyLevel(3);
   8  @include ("header.php");
   9  @include ("menu.php");
  10  ?>
  11  <div id="content">
  12  <div id="left">
  13  <form method="post" action="managerrelated.php">
  14  <fieldset><legend><? echo $ae->textbasic[44]; ?></legend>
  15  <label for="title"><? echo $ae->textbasic[40]; ?></label>
  16  <input type="text" name="title" id="title" size="20" value="<? echo $ae->title; ?>" />
  17  <br class="clear" />
  18  <label for="submit"></label>
  19  <input type="submit" name="submit" id="submit" value="<? echo $ae->textbasic[116]; ?>" class="button" />
  20  <input type="hidden" name="username" value="<? echo $ae->username; ?>" />
  21  <input type="hidden" name="session" value="<? echo $ae->session; ?>" />
  22  <input type="hidden" name="action" value="show" />
  23  </fieldset>
  24  </form>
  25  <? if ($ae->action=="show"): ?>
  26  <?
  27  if ($ae->title) $ae->DBQuery("SELECT * FROM ".$ae->table[3]." WHERE title LIKE '%".$ae->title."%' ORDER BY title");
  28  else $ae->DBQuery("SELECT * FROM ".$ae->table[3]." WHERE ID='".$ae->articleID."'");
  29  if ($ae->rowsnumber==1 OR $ae->articleID)
  30     {
  31     $ae->DBGetRow();
  32     $ae->articleID=$ae->access["ID"];
  33     echo '<form method="post" action="modify.php?command=14">';
  34     echo '<fieldset><legend>',$ae->textbasic[41],'</legend>';
  35     echo '<p><strong>',$ae->textbasic[40],'</strong> ',$ae->access["title"],'</p>';
  36     $ae->DBQuery("SELECT relart.relatedID AS relatedID,art.title AS title,art.text AS text FROM ".$ae->table[7]." AS relart LEFT JOIN ".$ae->table[3]." AS art ON relart.relatedID=art.ID WHERE relart.articleID='".$ae->articleID."'");
  37     if ($ae->rowsnumber)
  38        {
  39        echo '<table width="95%">';
  40        $i=0;
  41        while ($ae->DBGetRow())
  42              {
  43              echo '<tr>';
  44              $optionvalue=$ae->access["relatedID"];
  45              $optiontitle=$ae->access["title"];
  46              $optiontext=$ae->access["text"];
  47              echo '<td><input type="checkbox" name="relatedID[',$i,']" id="relatedID[',$i,']" value="',$optionvalue,'" /><label for="relatedID[',$i,']">',$optiontitle,'</label></td>';
  48              echo '<td>',substr(strip_tags($optiontext),0,300),'</label></td>';
  49              $i++;
  50              echo '</tr>';
  51              }
  52        echo '</table>';
  53        echo '<label for="submit"></label>';
  54        echo '<input type="submit" name="submit" id="submit" value="',$ae->textbasic[110],'" class="button" />';
  55        echo '<input type="hidden" name="username" value="',$ae->username,'" />';
  56        echo '<input type="hidden" name="session" value="',$ae->session,'" />';
  57        echo '<input type="hidden" name="articleID" value="',$ae->articleID,'" />';
  58        echo '</fieldset>';
  59        echo '</form>';
  60        }
  61     }
  62  else
  63     {
  64     while ($ae->DBGetRow())
  65           {
  66           $articleID=$ae->access["ID"];
  67           $title=$ae->access["title"];
  68           echo '<a href="managerrelated.php?username=',$ae->username,'&session=',$ae->session,'&action=show&articleID=',$articleID,'">',$title,'</a><br />';
  69           }
  70     }
  71  ?>
  72  <? endif; ?>
  73  </div>
  74  <div id="right">
  75  <form method="post" action="modify.php?command=15">
  76  <fieldset><legend><? echo $ae->textbasic[43] ?></legend>
  77  <label for="articleID"><? echo $ae->textbasic[40] ?></label>
  78  <select name="articleID" id="articleID">
  79  <option value="0"<? if (!$ae->articleID) echo " selected"; ?>><? echo $ae->textbasic[39]; ?>
  80  <?
  81  $ae->DBQuery("SELECT * FROM ".$ae->table[3]." ORDER BY title");
  82  while ($ae->DBGetRow())
  83        {
  84        $optionvalue=$ae->access["ID"];
  85        $optiontext=$ae->access["title"];
  86        echo '<option value="',$optionvalue,'"';
  87        if ($ae->articleID==$optionvalue) echo ' selected="selected"';
  88        echo '>',$optiontext,'</option>';
  89        }
  90  ?>
  91  </select>
  92  <br class="clear" />
  93  <label for="title"><? echo $ae->textbasic[150]; ?></label>
  94  <input type="text" name="title" id="title" size="30" value="<? echo $ae->title; ?>"><br class="clear" />
  95  <label for="search"></label>
  96  <input type="submit" name="submit" id="search" value="<? echo $ae->textbasic[112]; ?>" class="button" /><br class="clear" /><br class="clear" />
  97  <?
  98  if ($ae->title)
  99     {
 100     $ae->DBQuery("SELECT * FROM ".$ae->table[3]." WHERE title LIKE '%".$ae->title."%' AND ID<>'".$ae->articleID."' ORDER BY title");
 101     if ($ae->rowsnumber)
 102        {
 103        echo '<table width="95%">';
 104        $i=0;
 105        while ($ae->DBGetRow())
 106              {
 107              echo '<tr>';
 108              $optionvalue=$ae->access["ID"];
 109              $optiontitle=$ae->access["title"];
 110              $optiontext=$ae->access["text"];
 111              echo '<td title="',substr(strip_tags($optiontext),0,300),'"><input type="checkbox" name="relatedID[',$i,']" id="relatedID[',$i,']" value="',$optionvalue,'" /><label for="relatedID[',$i,']">',$optiontitle,'</label></td>';
 112              $i++;
 113              echo '</tr>';
 114              }
 115        echo '</table>';
 116        echo '<input type="submit" name="submit" id="submit" value="',$ae->textbasic[103],'" class="button" />';
 117        }
 118     }
 119  ?>
 120  <input type="hidden" name="username" value="<? echo $ae->username; ?>" />
 121  <input type="hidden" name="session" value="<? echo $ae->session; ?>" />
 122  </fieldset>
 123  </form>
 124  </div>
 125  </div>
 126  <? @include ("footer.php"); ?>

title

Description

title

Description

title

Description

title

title

Body