///////////////////////////////////////////////////////////////////////////////////////
// PHPmotion http://www.phpmotion.com //
///////////////////////////////////////////////////////////////////////////////////////
// License: You are not to sell or distribute this software without permission //
// Main Author: Brian Shawa - bshawa@gmail.com //
// Help and support please visit http://www.phpmotion.com //
// Copyright reserved //
///////////////////////////////////////////////////////////////////////////////////////
include_once ("classes/config.php");
include_once ('classes/login_check.php');
include_once ('classes/menu.php');
include_once ('classes/sessions.php');
include "uploader_conlib.php";
//load javascript thats in inner_main1.htm
$load_javascript = 1;
//inc_ load picture loading include
include_once ("inc_mypicture.php");
//echo $debugmodex;
//get channel data, create "select" form fields to load into form
$sql = "SELECT * FROM channels";
$result1 = @mysql_query($sql);
$fileds_all = "";
while ($result = @mysql_fetch_array($result1)) {
$field = '';
$fields_all = $fields_all . $field;
}
//$fields_all = html_entity_decode($fields_all);
//grab values from form if any
//////////////////////////////
$form_submitted = $_POST['form_submitted'];//check if form has been submitted
$title = $_POST['title'];
$description = $_POST['description'];
$tags = $_POST['tags'];
$date_uploaded = $_POST["date_format"];
$location_recorded = $_POST["location_recorded"];
$allow_comments = $_POST['allow_comments'];
$allow_embedding = $_POST['allow_embedding'];
$public_private = $_POST['public_private'];
$channel = $_POST['channel'];
$procede = true;
// ///////////////
// validating form
// ///////////////
if ($form_submitted == "yes") {
foreach ($_POST as $key => $value) {
if ($key == "title" || $key == "description" || $key == "tags") {
if (!isset($value) || ($value == "")) {
$display_key = @str_replace('_', " ", $key);
//error TBS
$message_type = $config["notification_error"];
$blk_notification = 1;
$error_message = $error_message . " - " . $display_key . " is required ";
$procede = false;
}
}
}
}
// //////////////////////////////
// display page with form error
// //////////////////////////////
if ($procede == false && $form_submitted == "yes") {
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_upload_video_form.htm";//middle of page
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;// no more error message displayed.
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->Show();
@mysql_close();
die();
}
// /////////////////
// disply clean page
// /////////////////
if (!isset($form_submitted) || ($form_submitted == "")) {
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_upload_video_form.htm";//middle of page
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;// no more error message displayed.
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->Show();
@mysql_close();
die();
}
// /////////////////////////////////////////////////////////
// if all has gone well, register user and load welcome page
// close sql connection here
// /////////////////////////////////////////////////////////
if ($procede == true && $form_submitted == "yes") {
//================================================================START OF UPLOAD===================================================================
$THIS_VERSION = "2.0";
if (isset($_GET['cmd']) && $_GET['cmd'] == 'about') {
kak("UBER UPLOADER FILE UPLOAD
UBER UPLOADER VERSION = " .
$UBER_VERSION . "
UU_FILE_UPLOAD = " . $THIS_VERSION . "
\n");
}
$tmp_sid = md5(uniqid(mt_rand(), true));
///////////////////////////////////////////////////////////////////////
// This is where you might set your config file eg. //
// if($_SESSION['user'] == "tom"){ $config_file = 'uu_tom_config'; } //
///////////////////////////////////////////////////////////////////////
$config_file = $default_config_file;
$path_to_upload_script .= '?tmp_sid=' . $tmp_sid;
$path_to_ini_status_script .= '?tmp_sid=' . $tmp_sid;
if ($MULTI_CONFIGS_ENABLED) {
$path_to_upload_script .= "&config_file=$config_file";
$path_to_ini_status_script .= "&config_file=$config_file";
}
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_upload_video.htm";//middle of page
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;// no more error message displayed.
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->Show();
@mysql_close();
die();
//====================================================================END OF UPLOADER================================================================
}
?>