Location: PHPKode > projects > Tagging manager > version 1.02/process.php
<?php

/**
 * To process posted data (url, title, description) ...
 *
 * @author michael.zenner
 * @package taggingmanager
 */
/*  ============================================================
 *                              process.php 
 *                              -------------------
 *     Date                 : 10 aug 2006
 *     E-mail               : hide@address.com
 *
 *     Version              : 1.0.2
 *
 *     This a free software 
 *     licensed under GPL (General public license)
 *
    ============================================================ */

  $root_path = './';
  
  include_once($root_path.'config.php');
	  
  require_once($root_path.'includes/dbconn.php');
  require_once($root_path.'includes/functions.php');
  require_once($root_path.'includes/user.php');
  require_once($root_path.'includes/metadata.php');
  

//after submit add metadata
if (isset($_COOKIE["user"]) AND isset($_COOKIE["secret"])) {
$myUser = new User;

$myUser->userName = $_COOKIE["user"];
$myUser->userPassword = $_COOKIE["secret"];

$myUser->verifyPassword();


   
if ($captcha) {session_start();
      if (md5($_POST['code']) == $_SESSION['code']){
      }else{
         echo "Use backbutton and re-enter the captcha code!";
         $caperror = 1;
      }
   };
if (!$caperror == 1)	{
if (array_key_exists('_submit_check', $_POST)) {
$link = new Link;
$link->url = $_POST[url];
$link->title = $_POST[title];
$link->description = $_POST[description];
$link->tags = $_POST[keywords];
$link->snipset = $_POST[snipset];
$link->taxonomy_id = $_POST[taxonomy];
$link->ipcreator = $link->ipmod = getenv('REMOTE_ADDR');
$link->html = $_SESSION['rawhtml'];
$link->user_id = $myUser->user_id;
$link->datum = $_POST[datum];
$link->author = $_POST[author];
$redirect = $_POST[redirect];

switch ($_POST[action]) {
case update:
	if ($_POST[delete]==1) {
   $link->Delete($_POST[meta_id]);
   header("location:$location"); 
  break;} else {
   $link->update($_POST[meta_id]);
   header("location:$location/view.php?id=$_POST[meta_id]"); 
  break;}
case write:
   $link->write();
   if ($redirect) {header("location:$link->url"); 
  }else { header("location:$location");  }
   break;
}

}
}
}
?>
Return current item: Tagging manager