public static function addUser($username, $password, $confirmpass, $email, $captcha)
 {
     $username = RemoveHack($username);
     $password = RemoveHack($password);
     $confirmpass = RemoveHack($confirmpass);
     $email = RemoveHack($email);
     $captcha = RemoveHack($captcha);
     if (MySql::dbselect("id", "user", "username = '******'")) {
         $arr = 'user';
     } else {
         if (MySql::dbselect("id", "user", "email = '{$email}'") or !filter_var($email, FILTER_VALIDATE_EMAIL)) {
             $arr = 'email';
         } else {
             if ($password !== $confirmpass) {
                 $arr = 'confirmpass';
             } else {
                 if (strlen($password) < 6 or strlen($password) > 15) {
                     $arr = 'password';
                 } else {
                     if ($captcha !== $_SESSION["security_code"]) {
                         $arr = 'captcha';
                     } else {
                         $codesecurity = rand(1000, 9999);
                         $password = md5(md5($password) . $codesecurity);
                         $lastreg = time();
                         MySql::dbinsert("user", "username,password,email,codesecurity,lastreg", "'{$username}','{$password}','{$email}','{$codesecurity}','{$lastreg}'");
                         $arr = 'done';
                     }
                 }
             }
         }
     }
     return $arr;
 }
 public static function AddLog($type, $text)
 {
     if (!IS_LOGIN) {
         $arr = 'user';
     } else {
         if ($_SESSION["RK_Support"]) {
             $arr = 'err';
         } else {
             $userid = $_SESSION["RK_Userid"];
             $type = intval($type);
             $content = RemoveHack($text);
             $user = MySql::dbselect("username", "user", "id = '{$userid}'");
             $username = $user[0][0];
             if ($type == '1') {
                 $type = 'Báo lỗi phim';
             } else {
                 if ($type == '2') {
                     $type = 'Báo lỗi video';
                 } else {
                     if ($type == '3') {
                         $type = 'Báo lỗi hệ thống';
                     } else {
                         if ($type == '4') {
                             $type = 'Yêu cầu chức năng';
                         } else {
                             if ($type == '5') {
                                 $type = 'Lỗi Khác';
                             }
                         }
                     }
                 }
             }
             $title = $type . " | Gửi từ {$username}";
             MySql::dbinsert("log", "title,content", "'{$title}','{$content}'");
             $_SESSION["RK_Support"] = 1;
             $arr = 'done';
         }
     }
     return $arr;
 }
<?php

define('RK_MEDIA', true);
# Conectados Los archivos importantes
require 'init.php';
$url = $_GET['newthumb'];
MySql::dbinsert("test", "url", "'{$url}'");
#echo $_GET['id'];
Ejemplo n.º 4
0
            //LoginAuth::loginUser($user_profile["username"],$_POST['password'],$_POST['remember']);
            $username = $user_profile["username"];
            $user = MySql::dbselect("id,username,password,codesecurity", "user", "username = '******' OR email = '{$username}'");
            if ($user) {
                $userid = $user[0][0];
                $lastlogin = time();
                MySql::dbupdate('user', "lastlogin = '******'", "id = '{$userid}'");
                $_SESSION["RK_Userid"] = $userid;
            } else {
                $username = $user_profile["username"];
                $fullname = $user_profile["name"];
                $email = $user_profile["email"];
                $facebookurl = 'https://www.facebook.com/' . $user_profile["id"];
                $codesecurity = rand(1000, 9999);
                $lastreg = time();
                MySql::dbinsert("user", "username,email,codesecurity,lastreg,facebookid,fullname", "'{$username}','{$email}','{$codesecurity}','{$lastreg}','{$facebookurl}','{$fullname}'");
                $userid = mysql_insert_id();
                $_SESSION["RK_Userid"] = $userid;
            }
            header("Location: " . SITE_URL);
        } else {
            header("Location: " . $loginUrl);
        }
    } elseif ($page == 'dang-ky') {
        ?>
<div style="margin-top:70px"></div>
<div class="p-profile clearfix" id="reg_page">
	<div class="user-info">
		<div class="middle_left" style="width:45%">
			<label class="tit">Đăng ký</label>
			<div class="stat">
function Get_List_actor($list)
{
    $data = explode(',', $list);
    for ($i = 0; $i < count($data); $i++) {
        $name = RemoveHack($data[$i]);
        if ($name) {
            $arr = MySql::dbselect("info,urlmore,thumb", "actor", "name = '{$name}'");
            $image = $arr[0][2];
            $info = $arr[0][0];
            if (!$arr) {
                /*$wiki = cURL::getWiki(trim($data[$i]));
                		$image = $wiki[3];
                		$urlmore = $wiki[2];
                		$info = CutName($wiki[1],200);
                		MySql::dbinsert('actor','name,info,urlmore,thumb',"'$name','$info','$urlmore','$image'");*/
                MySql::dbinsert('actor', 'name', "'{$name}'");
            }
            if (!$info) {
                $info = "Chưa có thông tin về {$name}";
            }
            if ($image) {
                $infodiv[$i] = "\n\t\t\t\t<div class=\"actor-info-single\">\n\t\t\t\t\t<div class=\"actor-single-picture\">\n\t\t\t\t\t\t<img src=\"{$image}\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"single-info\">\n\t\t\t\t\t\t<div class=\"name-of-actor\">\n\t\t\t\t\t\t\t{$name}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"des-actor-single\">\n\t\t\t\t\t\t\t<span class=\"read-more-actor\">\n\t\t\t\t\t\t\t\t{$info} <br /><a href=\"{$url}\" class=\"more-actor\"> Xem thêm »</a>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t";
            }
            if (!$image) {
                $image = TEMPLATE_URL . 'images/noactoravatar.gif';
            }
            $url = Url::get(0, $name, 'search');
            $html .= "\n\t\t\t<li>\n\t\t\t\t<img src=\"{$image}\" alt=\"{$name}\" width=\"45px\" height=\"58px\"/>\n\t\t\t\t<div class=\"act-info\">\n\t\t\t\t\t<p class=\"name\">\n\t\t\t\t\t\t<a href=\"{$url}\" class=\"data-actor\" title=\"Tìm phim của {$name}\">{$name}</a>\n\t\t\t\t\t</p>\n\t\t\t\t\t<span></span>\n\t\t\t\t</div>\n\t\t\t\t" . $infodiv[$i] . "\n\t\t\t</li>\n\t\t\t";
        }
    }
    return $html;
}