コード例 #1
0
<?php

@session_start();
include "define_file.php";
include "classes/tbl_param_class_AddEditDelete.php";
$myClass = new TtblParamAddEditDelete();
$myClass->TConnect();
$myClass->setValue($database_host, $DB_video_streaming, $db_user, $db_pass);
$GlassAllconn_id = $myClass->connectToDatabase();
$error = $myClass->selectDatabase();
/*****/
$video_url = $_REQUEST['video_url'];
$video_name = $_REQUEST['video_name'];
$version = $_REQUEST['version'];
$duration = $_REQUEST['duration'];
$size = $_REQUEST['size'];
$width = $_REQUEST['width'];
$height = $_REQUEST['height'];
$framerate = $_REQUEST['framerate'];
$videodatarate = $_REQUEST['videodatarate'];
$audiodatarate = $_REQUEST['audiodatarate'];
$audiodelay = $_REQUEST['audiodelay'];
$audiocodecid = $_REQUEST['audiocodecid'];
$ACidMap_audiocodecid = $_REQUEST['ACidMap_audiocodecid'];
$videocodecid = $_REQUEST['videocodecid'];
$VCidMap_videocodecid = $_REQUEST['VCidMap_videocodecid'];
$execution_time = $_REQUEST['execution_time'];
//$currentTime = $_REQUEST['currentTime'];
$sql = "INSERT INTO tbl_ab_videos \n\t\t(\n\t\t\ttbl_ab_videos_url,\n\t\t\ttbl_ab_videos_name,\n\t\t\ttbl_ab_videos_version,\n\t\t\ttbl_ab_videos_duration,\n\t\t\ttbl_ab_videos_size,\n\t\t\ttbl_ab_videos_width,\n\t\t\ttbl_ab_videos_height,\n\t\t\ttbl_ab_videos_framerate,\n\t\t\ttbl_ab_videos_videodatarate,\n\t\t\ttbl_ab_videos_audiodatarate,\n\t\t\ttbl_ab_videos_audiodelay,\n\t\t\ttbl_ab_videos_audiocodecid,\n\t\t\ttbl_ab_videos_acidmap_audiocodecid,\n\t\t\ttbl_ab_videos_videocodecid,\n\t\t\ttbl_ab_videos_vcidmap_videocodecid,\n\t\t\ttbl_ab_videos_execution_time\n\t\t\t\n\t\t)\n\t\tVALUES\n\t\t(\n\t\t \t'" . $video_url . "',\n\t\t\t'" . $video_name . "',\n\t\t\t'" . $version . "',\n\t\t\t'" . $duration . "',\n\t\t\t'" . $size . "',\n\t\t\t'" . $width . "',\n\t\t\t'" . $height . "',\n\t\t\t'" . $framerate . "',\n\t\t\t'" . $videodatarate . "',\n\t\t\t'" . $audiodatarate . "',\n\t\t\t'" . $audiodelay . "',\n\t\t\t'" . $audiocodecid . "',\n\t\t\t'" . $ACidMap_audiocodecid . "',\n\t\t\t'" . $videocodecid . "',\n\t\t\t'" . $VCidMap_videocodecid . "',\n\t\t\t'" . $execution_time . "'\n\t\t\t\n\t\t)\n\t\t";
//tbl_ab_videos_current_time = '".$currentTime."'
$res = mysql_query($sql) or die(mysql_error());
コード例 #2
0
<?php

include "../define_file.php";
include "tbl_param_class_AddEditDelete.php";
$myClass = new TtblParamAddEditDelete();
$myClass->TConnect();
//Κλήση της κλάσης TConnect χωρίς ορίσματα
//Εδώ η βάση παίρνει την θύρα 3306 ( by default ) τιμή
//της MySql
$myClass->setValue($database_host, $DB_glass_apps, $db_user, $db_pass);
//Σύνδεση με την βάση
//$myClass->printValue();
$connected = $myClass->connectToDatabase();
//echo "<br>connected:".$connected."<br>";
$error = $myClass->selectDatabase();
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$fromFile = $_REQUEST['fromFile'];
echo $username;
$sql = "SELECT tbl_param_users_username \n\t\tFROM tbl_param_users\n\t\tWHERE tbl_param_users_username = '******' \n\t\tAND tbl_param_users_password = '******' ";
$res = mysql_query($sql, $connected);
if (@mysql_num_rows($res) > 0) {
    $url = $fromFile;
    echo "done";
    $expire = time() + 60 * 60 * 24 * 30;
    setcookie("userLoginForm", $username, $expire);
    $myClass->goto($url);
} else {
    echo "Error username";
}
global $ob_starting;