[ PHPXref.com ] [ Generated: Sun Jul 20 18:22:37 2008 ] [ Jlog 1.0.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/admin/ -> change.php (source)

   1  <?php
   2   include_once ('.'.DIRECTORY_SEPARATOR.'auth.php');
   3   define("JLOG_ADMIN", true);
   4   require('..'.DIRECTORY_SEPARATOR.'personal'.DIRECTORY_SEPARATOR.'settings.inc.php');
   5   require (JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
   6   
   7   $get = strip($_GET);
   8   $post = strip($_POST);
   9   
  10   $c['meta']['title'] = $l['admin']['change_headline'];
  11   $c['main'] = output_admin_menu();
  12   $c['main'] .= "<h2>".$l['admin']['change_headline']."</h2>";
  13  
  14  if($get['action'] == "trash" AND $post['trash'] == $l['admin']['yes']) {
  15   $c['main'] .= "<p>".trash_blog($get['id'])."</p>";
  16   include_once (JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
  17  }
  18  elseif ($get['action'] == trash AND empty($post['trash'])) {
  19   $c['main'] .= "
  20     <form method='post' id='entryform' action='".$_SERVER['PHP_SELF']."?id=".$get['id']."&amp;action=trash'>
  21       <p>".$l['admin']['rearly_delete']." <input class='send' type='submit' name='trash' value='".$l['admin']['yes']."' />
  22        <a href='".JLOG_PATH."/admin/'>".$l['admin']['no']."</a></p>
  23     </form>";
  24    $form_input = get_blog($get['id']);
  25    $c['main'] .= preview_output($form_input);
  26    $c['title'] = $l['admin']['delete_blogentry'];  
  27  }
  28  
  29  else {
  30      if(isset($get['id'])) $form_input = get_blog($get['id']);
  31      elseif (isset($_POST)) $form_input = $post;
  32      else $c['main'] .= $l['admin']['error_occurred'];
  33      
  34      if($post['form_submitted'] == $l['admin']['preview']) {
  35       $c['main'] .= error_output(check_input($form_input));
  36       $c['main'] .= preview_output($form_input);
  37       $c['main'] .= form_output($form_input);
  38      }
  39      elseif($post['form_submitted'] == $l['admin']['publish']) {
  40          // Put data to database
  41          if(!check_input($form_input)) {
  42           $c['main'] .= "<p>".update_blog($form_input)."</p>";
  43           include_once (JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
  44          }
  45          else {
  46           // show preview and form
  47           $c['main'] .= error_output(check_input($form_input));
  48            $c['main'] .= form_output($form_input);
  49          }
  50      }
  51      else {
  52          // show form
  53            $c['main'] .= form_output($form_input);
  54      }
  55  }
  56  
  57  require (JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
  58  echo $body;
  59  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]