Location: PHPKode > projects > Modular Site Manager > htdocs/misc/codedb.submit.php
<?php
chdir("../");
include "inc/functions.inc.php";
$desc = $_POST['desc'];
$cat = $_POST['cat'];
$code = $_POST['code'];
$date = time();
if(!isset($_POST['public']))
{
	$public = 'no';
} else
{
	$public = 'yes';
}
$users = explode(', ', $_POST['allowedids']);
$allowedids = $_COOKIE['mid'];
foreach($users as $user)
{
	$allowedids .= getuserinfo('id', $user);
}
$mysql->insert(PRE.'codedb',
array('name', 'cat', 'code', 'userid', 'allowedids', 'public', 'date'),
array($desc, $cat, $code, $_COOKIE['mid'], $allowedids, $public, $date)
);
$mysql->close();
//ob_flush();
header('Location: '.SITE_URL.'/CodeDB/View/'.$cat.'/');
?>
Return current item: Modular Site Manager