Exemple #1
0
function myOrUserVideos($postParams, $getParams, $siteParams)
{
    $get = UserFull::create();
    $visitor = $get->id;
    //is_numeric($siteParams[0]) ? $userID=$siteParams[0]: $userID=$visitor;
    $userID = $siteParams[0];
    //$checker = new UserRegister();
    //$userID = $checker->checkIfExsistID($userID) ? $userID : $visitor;
    $se = new VideoThing();
    $arr = $se->showMyVideos($userID, $getParams["i"]);
    if ($arr == NULL) {
        return "По Вашему запросу ничего не найдено.";
    }
    foreach ($arr as $key) {
        //die(var_dump($key));
        $tmp = $se->getVideo($key["videoID"]);
        $img = "<img src = \"{$tmp['Preview']}\">";
        $div = $div . "<div style=\"border:1px solid #999999; height: auto; margin: 3px; height: 140px; width: auto;\" id='video{$key['id']}'>\n\t\t\t<div style=\"float:left; border-right: 1px solid #999999; width: auto; \">{$img}</div> \n\t\t\t<div style=\"float: left; height: auto; padding: 10px ;\"> {$key['title']} \n <br /> \n\t\t\t<a href=\"/video/?v={$key['videoID']}\"> просмотр</a>\n\t\t\t<br />\n\t\t\t\n\t\t\t<div id=\"added{$key['videoID']}\"> </div>\n\t\t\t<div>\n\t\t\t<form>\n\t\t\t<input type=\"button\" id=\"addVideo{$key['videoID']}\" value=\"Добавить к себе\" onClick=\"addVideo('{$key['videoID']}','{$key['title']}')\">\n\t\t\t<input type=\"button\" id=\"delVideo{$key['videoID']}\" value=\"Удалить\" onClick=\"delVideo('{$key['id']}','{$visitor}')\"> \n\t\t\t</form>\n\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>";
    }
    $smarty = new SmartyExst();
    $smarty->assign("searchResults", $div);
    return $smarty->fetch("video/video.user.tpl");
}
Exemple #2
0
 public static function create($id = NULL)
 {
     if (self::$instance == NULL) {
         self::$instance = true;
         self::$instance = new UserFull($id);
     }
     return self::$instance;
 }
Exemple #3
0
         header("Location: /user/");
     }
     if ($sigin) {
         header("Location: {$links['signInPath']}");
     }
     break;
 case "view":
     try {
         if ($usersSignInOut->isEntered()) {
             if ($data["parameters"][1] != NULL) {
                 $currentUser = UserFull::create($data["parameters"][1]);
             } else {
                 $currentUser = UserFull::create();
             }
         } else {
             $currentUser = UserFull::create();
         }
     } catch (UserException $ex) {
         header("Location: /user/");
     }
     //$data=new UserDataChange();
     //Registry::setKey("loc",$currentUser->location->getLocationId());
     //$currentUser->location->changeLocation(array("countryId" => 3159, "regionId" =>54 , "cityId" => 5281));
     $timeUTC = new UTCTime(true);
     $smarty->assign("lastUpdateTime", $timeUTC->getTime($currentUser->lastUpdate));
     $smarty->assign("location", $currentUser->location->getLocation());
     $smarty->assign("info", $currentUser->getInfo());
     $smarty->assign("user", $currentUser);
     $smarty->assign("photo", $currentUser->getPhoto());
     $output["title"] = $currentUser->name . " " . $currentUser->secondName;
     $output["text"] = $smarty->fetch("users.view.tpl");
Exemple #4
0
 /**
  * Конструктор
  * 
  */
 public function __construct()
 {
     parent::__construct();
     $user = UserFull::create();
     $this->_curentId = $user->id;
 }