예제 #1
0
파일: init.php 프로젝트: EntityFX/QuikiJAR
require_once 'engine/libs/mysql/MySQLConnector.php';
require_once "config/databaseConsts.php";
$parameters = $data["parameters"];
//$v = new VideoThing();
//$v->authYT();
//var_dump($_SERVER["DOCUMENT_ROOT"]);
switch (count($parameters)) {
    case 0:
        // /video  -- show my video files
        $output["text"] = showOneVideo($_GET);
        break;
    case 1:
        switch ($parameters[0]) {
            case "add":
                // /video/add -- add video, blin
                add2my($_POST);
                break;
            case "search":
                // /video/search  -- searc videos
                $output["text"] = searcher($_POST, $_GET);
                break;
            default:
                // /video/userID  -- show user's videos
                //header("Location: /video/");
                $output["text"] = myOrUserVideos($_POST, $_GET, $parameters);
                break;
        }
        break;
    default:
        break;
}
예제 #2
0
파일: init.php 프로젝트: EntityFX/QuikiJAR
//require_once '../../engine/modules/user/UserRegister.php';
require_once '../../engine/kernel/classLoader.php';
//это в любом случае на первом месте само собой
/*
 * было так
 * require_once "../../engine/libs/mysql/MySQLConnector.php";
 * а стало так
 * Loader::loadClass("engine/libs/mysql/MySQLConnector.php");
 */
//Loader::loadClass("engine/modules/user/UserFull.php");
Loader::loadClass("engine/libs/mysql/MySQLConnector.php");
Loader::loadClass("engine/modules/video/Video.php");
Loader::loadClass("config/databaseConsts.php");
switch ($_POST["type"]) {
    case "add":
        die(add2my($_POST));
        break;
    case "del":
        die(delVideo($_POST));
        break;
    default:
        break;
}
function myOrUserVideos($postParams, $getParams, $siteParams)
{
    /*$user=new User();
    		$visitor = $user->id;*/
    //$userocheg=new UserFull();
    $userocheg->id;
    $visitor = 13;
    //is_numeric($siteParams[0]) ? $userID=$siteParams[0]: $userID=$visitor;