Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.3
- * @ Author : DeZender
- * @ Release on : 06.05.2013
- * @ Official site : http://DeZender.Net
- *
- */
- function hex2bin($hexdata) {
- $i = 0;
- while ($i < strlen($hexdata))
- {
- $bindata .= chr(hexdec(substr($hexdata, $i, 2)));
- $i += 2;
- continue;
- }
- return $bindata;
- }
- function __autoload($classname) {
- $tre = substr($classname, 0, 5);
- if ($tre == "vodo-")
- {
- $folder = DIR . "/hooks/";
- $folder1 = "../hooks/";
- }
- else
- {
- $folder = DIR . "/includes/";
- $folder1 = "../includes/";
- }
- if (file_exists($folder . $classname))
- {
- require_once $folder . $classname;
- return null;
- }
- if (file_exists($folder1 . $classname))
- {
- require_once $folder1 . $classname;
- return null;
- }
- $htmlerror = "<html dir=\"rtl\">\r
- \r
- <head>\r
- <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1256\">\r
- <meta http-equiv=\"Content-Language\" content=\"ar-eg\">\r
- <title>(SYSTEM ERROR)</title>";
- die($htmlerror . "<B>ÎØà ÞÇÊá</B> : áÇ íãßä ÊÍãíá ÇáßáÇÓ <u>" . $folder . $classname . "<br /><b>ÇáÎØà Ýí ÇáÓØÑ</b>:" . 74 . "</HTML>");
- return;
- }
- function setting() {
- global $db;
- $Query = "SELECT * FROM " . TABLE_PREFIX . "setting";
- $result = $db->dbquery($Query);
- $r = $db->db_object($result);
- $output["sitename"] = iconv("utf-8", CHARSET, $r->sitename);
- $output["sitetitle"] = iconv("utf-8", CHARSET, $r->sitetitle);
- $output["siteemail"] = $r->siteemail;
- $output["metakeywords"] = iconv("utf-8", CHARSET, $r->metakeywords);
- $output["metadesc"] = iconv("utf-8", CHARSET, $r->metadesc);
- $output["closesite"] = $r->closesite;
- $output["siteclosemsg"] = $r->siteclosemsg;
- $output["siteclosemsg"] = iconv("utf-8", CHARSET, $r->siteclosemsg);
- $output["emailsactive"] = $r->emailsactive;
- $output["fileswhere"] = $r->fileswhere;
- $output["style"] = $r->style;
- $output["alluploads"] = $r->alluploads;
- $output["sitelogo"] = $r->sitelogo;
- $output["version"] = $r->version;
- $output["lang"] = $r->lang;
- $output["cpstyle"] = $r->cpstyle;
- $output["cronjobhash"] = $r->cronjobhash;
- $output["timezone"] = $r->timezone;
- $output["members_updated"] = $r->members_updated;
- return $output;
- }
- function get_site_style() {
- $setting = setting();
- if (!$_COOKIE["style"])
- {
- return $setting["style"];
- }
- return $_COOKIE["style"];
- }
- function check_session() {
- if (SAVELOGINDATA == "session")
- {
- return session_start();
- }
- return;
- }
- function fetch_cookie($cookie) {
- global $PHPSESSID;
- if (!empty($cookie))
- {
- $c = userdetails(intval($cookie));
- $cookie = base64_decode(COOKIE_PREFIX . $cookie . baz . fez . faz . femtolayerinc);
- $cookie = str_replace(COOKIE_PREFIX, "", $cookie);
- $cookie = str_replace("bazfezfazfemtolayerinc", "", $cookie);
- return $cookie;
- }
- return "";
- }
- function userdetails($id) {
- global $db;
- $Query = "SELECT * FROM " . TABLE_PREFIX . "users WHERE id='" . $id . "'";
- $result = $db->dbquery($Query);
- if ($db->dbrows($result) != "0")
- {
- $r = $db->db_object($result);
- $output["userid"] = $r->id;
- $output["admin"] = $r->admin;
- $output["username"] = xss_clean($r->username);
- $output["password"] = $r->password;
- $output["email"] = xss_clean($r->email);
- $output["country"] = $r->country;
- $output["ipaddress"] = $r->ipaddress;
- $output["usercode"] = $r->usercode;
- $output["dateline"] = $r->dateline;
- $output["active"] = $r->active;
- $output["lastlogin"] = $r->lastlogin;
- $output["membershipid"] = $r->membershipid;
- $output["membertype"] = $r->membertype;
- $output["signature"] = $r->signature;
- $output["mobile"] = $r->mobile;
- }
- else ;
- return $output;
- }
- function check_user_active() {
- global $errormsg;
- global $tmps;
- global $body;
- $userid = intval($_SESSION["valid_login"]);
- $user = userdetails($userid);
- if ($user["active"] != "0")
- {
- $errormsg = "ÚÝæÇ , áÇÈÏ ãä ÊÝÚíá ÇáÚÖæíÉ ÃæáÇ";
- $body .= $tmps->get_temponly("error");
- $tmps->getHtml("body");
- $tmps->getHtml("footer");
- exit();
- }
- return;
- }
- function admindetails($id) {
- global $db;
- $Query = "SELECT * FROM " . TABLE_PREFIX . "admins WHERE userid='" . $id . "'";
- $result = $db->dbquery($Query);
- if ($db->dbrows($result) != "0")
- {
- $r = $db->db_object($result);
- $output["access"] = $r->access;
- $output["usertitle"] = $r->usertitle;
- $output["hooks"] = xss_clean($r->hooks);
- $output["dateline"] = $r->dateline;
- }
- else ;
- return $output;
- }
- function femtosetcookie($name, $value = "", $permanent = true, $allowsecure = true, $httponly = false) {
- if (defined("NOCOOKIES"))
- {
- return null;
- }
- if ($permanent)
- {
- $expire = TIMENOW + 60 * 60 * 24 * 365;
- }
- else
- {
- $expire = 0;
- }
- $httponly = $httponly && (is_browser("ie") || is_browser("mac")) ? (false) : ($httponly);
- $secure = REQ_PROTOCOL === "https" || $allowsecure ? (true) : (false);
- $name = COOKIE_PREFIX . $name;
- $filename = "N/A";
- $linenum = 0;
- if (!headers_sent($filename, $linenum))
- {
- if (!($value === "") && $value === false)
- {
- global $_ENV;
- if (!($_SERVER["PATH_INFO"]) || $_ENV["PATH_INFO"])
- {
- {
- global $_ENV;
- }
- $scriptpath = $_SERVER["PATH_INFO"] ? ($_SERVER["PATH_INFO"]) : ($_ENV["PATH_INFO"]);
- }
- else
- {
- global $_ENV;
- if (!($_SERVER["REDIRECT_URL"]) || $_ENV["REDIRECT_URL"])
- {
- {
- global $_ENV;
- }
- $scriptpath = $_SERVER["REDIRECT_URL"] ? ($_SERVER["REDIRECT_URL"]) : ($_ENV["REDIRECT_URL"]);
- }
- else
- {
- {
- global $_ENV;
- }
- $scriptpath = $_SERVER["PHP_SELF"] ? ($_SERVER["PHP_SELF"]) : ($_ENV["PHP_SELF"]);
- }
- }
- $scriptpath = preg_replace(array("#/[^/]+\\.php\$#i", "#/(" . preg_quote($__config["config"]["cpfolder"], "#") . "|" . preg_quote($__config["config"]["cpfolder"], "#") . ")(/|\$)#i"), "", $scriptpath);
- $dirarray = explode("/", preg_replace("#/+\$#", "", $scriptpath));
- $alldirs = "";
- $havepath = false;
- if (!defined("SKIP_AGGRESSIVE_LOGOUT"))
- {
- foreach ($dirarray as $thisdir)
- {
- $alldirs .= '' . $thisdir;
- $havepath = true;
- if (!empty($thisdir))
- {
- femto_setcookie($name, $value, $expire, $alldirs, "", $secure, $httponly);
- }
- $alldirs .= "/";
- femto_setcookie($name, $value, $expire, $alldirs, "", $secure, $httponly);
- continue;
- }
- }
- if ($havepath == false)
- {
- femto_setcookie($name, $value, $expire, "", "", $secure, $httponly);
- return null;
- }
- }
- femto_setcookie($name, $value, $expire, "", "", $secure, $httponly);
- }
- return;
- }
- function femto_setcookie($name, $value, $expires, $path = "", $domain = "", $secure = false, $httponly = false) {
- if ($httponly || $value)
- {
- foreach (array(",", ";", " ", " ", "\r", "\n", "\v", "\f") as $bad_char)
- {
- if (!(!(strpos($name, $bad_char) !== false) && strpos($value, $bad_char) !== false))
- {
- continue;
- }
- return false;
- }
- $cookie = '' . "Set-Cookie: " . $name . "=" . urlencode($value);
- $cookie .= 0 < $expires ? ("; expires=" . gmdate("D, d-M-Y H:i:s", $expires) . " GMT") : "";
- $cookie .= $path ? ('' . "; path=" . $path) : "";
- $cookie .= $domain ? ('' . "; domain=" . $domain) : "";
- $cookie .= $secure ? "; secure" : "";
- $cookie .= $httponly ? "; HttpOnly" : "";
- header($cookie, false);
- return true;
- }
- return setcookie($name, $value, $expires, $path, $domain, $secure);
- }
- function xss_clean($str) {
- $str = preg_replace("/\\0+/", "", $str);
- $str = preg_replace("/(\\\\0)+/", "", $str);
- $str = preg_replace("# +#", " ", $str);
- $str = str_replace(array("<?php", "<?PHP", "<?", "?>"), array("<?php", "<?PHP", "<?", "?>"), $str);
- $words = array("javascript", "vbscript", "script", "applet", "alert", "document", "write", "cookie", "window");
- foreach ($words as $word)
- {
- $temp = "";
- $i = 0;
- while ($i < strlen($word))
- {
- $temp .= substr($word, $i, 1) . "\\s*";
- $i++;
- continue;
- }
- $temp = substr($temp, 0, 0 - 3);
- $str = preg_replace("#" . $temp . "#s", $word, $str);
- $str = preg_replace("#" . ucfirst($temp) . "#s", ucfirst($word), $str);
- continue;
- }
- $str = preg_replace("#<a.+?href=.*?(alert\\(|alert&\\#40;|javascript\\:|window\\.|document\\.|\\.cookie|<script|<xss).*?\\>.*?</a>#si", "", $str);
- $str = preg_replace("#<img.+?src=.*?(alert\\(|alert&\\#40;|javascript\\:|window\\.|document\\.|\\.cookie|<script|<xss).*?\\>#si", "", $str);
- $str = preg_replace("#<(script|xss).*?\\>#si", "", $str);
- $str = preg_replace("#</*(onblur|onchange|onclick|onfocus|onload|onmouseover|onmouseup|onmousedown|onselect|onsubmit|onunload|onkeypress|onkeydown|onkeyup|onresize)[^>]*>#iU", "\\1>", $str);
- $str = preg_replace("#<(/*\\s*)(alert|applet|basefont|base|behavior|bgsound|blink|body|expression|form|frameset|frame|head|html|ilayer|iframe|input|layer|link|meta|plaintext|style|script|textarea|title|xml|xss)([^>]*)>#is", "<\\1\\2\\3>", $str);
- $str = preg_replace("#(alert|cmd|passthru|eval|exec|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\\s*)\\((.*?)\\)#si", "\\1\\2(\\3)", $str);
- $bad = array("document.cookie" => "", "document.write" => "", "window.location" => "", "javascript\\s*:" => "", "Redirect\\s+302" => "");
- foreach ($bad as $key => $val)
- {
- $str = preg_replace("#" . $key . "#i", $val, $str);
- continue;
- }
- $str = str_replace("<iframe", "", $str);
- $str = str_replace("</scr", "", $str);
- $str = str_replace("alert(", "", $str);
- return $str;
- }
- function encode_password($password) {
- $password = md5(base64_decode($password . femtolayer . m . gomaa . 2010 . 2014 . "adhammohamedgomaamohamedosman"));
- return $password;
- }
- function is_browser($browser, $version = 0) {
- static $is = null;
- if (!is_array($is))
- {
- $useragent = strtolower($_SERVER["HTTP_USER_AGENT"]);
- $is = array("opera" => 0, "ie" => 0, "mozilla" => 0, "firebird" => 0, "firefox" => 0, "camino" => 0, "konqueror" => 0, "safari" => 0, "webkit" => 0, "webtv" => 0, "netscape" => 0, "mac" => 0);
- if (strpos($useragent, "opera") !== false)
- {
- preg_match("#opera(/| )([0-9\\.]+)#", $useragent, $regs);
- $is["opera"] = $regs[2];
- }
- if (strpos($useragent, "msie ") !== false && !$is["opera"])
- {
- preg_match("#msie ([0-9\\.]+)#", $useragent, $regs);
- $is["ie"] = $regs[1];
- }
- if (strpos($useragent, "mac") !== false)
- {
- $is["mac"] = 1;
- }
- if (strpos($useragent, "applewebkit") !== false)
- {
- preg_match("#applewebkit/(\\d+)#", $useragent, $regs);
- $is["webkit"] = $regs[1];
- if (strpos($useragent, "safari") !== false)
- {
- preg_match("#safari/([0-9\\.]+)#", $useragent, $regs);
- $is["safari"] = $regs[1];
- }
- }
- if (strpos($useragent, "konqueror") !== false)
- {
- preg_match("#konqueror/([0-9\\.-]+)#", $useragent, $regs);
- $is["konqueror"] = $regs[1];
- }
- if (strpos($useragent, "gecko") !== false && !$is["safari"] && !$is["konqueror"])
- {
- preg_match("#gecko/(\\d+)#", $useragent, $regs);
- $is["mozilla"] = $regs[1];
- if (!(!(strpos($useragent, "firefox") !== false) && strpos($useragent, "firebird") !== false) && strpos($useragent, "phoenix") !== false)
- {
- preg_match("#(phoenix|firebird|firefox)( browser)?/([0-9\\.]+)#", $useragent, $regs);
- $is["firebird"] = $regs[3];
- if ($regs[1] == "firefox")
- {
- $is["firefox"] = $regs[3];
- }
- }
- if (!(strpos($useragent, "chimera") !== false) && strpos($useragent, "camino") !== false)
- {
- preg_match("#(chimera|camino)/([0-9\\.]+)#", $useragent, $regs);
- $is["camino"] = $regs[2];
- }
- }
- if (strpos($useragent, "webtv") !== false)
- {
- preg_match("#webtv/([0-9\\.]+)#", $useragent, $regs);
- $is["webtv"] = $regs[1];
- }
- if (preg_match("#mozilla/([1-4]{1})\\.([0-9]{2}|[1-8]{1})#", $useragent, $regs))
- {
- $is["netscape"] = '' . $regs[1] . "." . $regs[2];
- }
- }
- $browser = strtolower($browser);
- if (substr($browser, 0, 3) == "is_")
- {
- $browser = substr($browser, 3);
- }
- if ($is['' . $browser])
- {
- if ($version)
- {
- if ($version <= $is['' . $browser])
- {
- return $is['' . $browser];
- }
- }
- return $is['' . $browser];
- }
- return 0;
- }
- function mail_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "mailsetting Limit 1");
- $r = $db->db_object($S);
- $msetting["mail_type"] = $r->mail_type;
- $msetting["utf8_encode"] = $r->utf8_encode;
- $msetting["html_xml"] = $r->html_xml;
- $msetting["mbstringactive"] = $r->mbstringactive;
- $msetting["messageid"] = $r->messageid;
- $msetting["fromheaders"] = $r->fromheaders;
- $msetting["cc_mail"] = $r->cc_mail;
- $msetting["bcc_mail"] = $r->bcc_mail;
- $msetting["smtp_yes"] = $r->smtp_yes;
- $msetting["smtp_server"] = $r->smtp_server;
- $msetting["smtp_port"] = $r->smtp_port;
- $msetting["smtp_account"] = $r->smtp_account;
- $msetting["smtp_password"] = $r->smtp_password;
- $msetting["smtp_tls"] = $r->smtp_tls;
- return $msetting;
- }
- function vodoemail($title, $to, $msg) {
- global $sitename;
- global $date;
- global $rbills;
- global $rusera;
- global $setting;
- global $style;
- global $text;
- $email = $to;
- $setting = setting();
- $mailsetting = mail_setting();
- if (file_exists(DIR . "/includes/class__email.php"))
- {
- require_once DIR . "/includes/class__email.php";
- }
- else
- {
- require_once "../includes/class__email.php";
- }
- $mail = new PHPMailer();
- if ($setting["emailsactive"] == "0")
- {
- if ($mailsetting["smtp_yes"] == "1")
- {
- if ($mailsetting["html_xml"] == "HTML")
- {
- $mail->IsHTML("true");
- }
- $mail->CharSet = $mailsetting["utf8_encode"];
- $mail->From = $setting["siteemail"];
- $mail->FromName = $setting["sitename"];
- $mail->AddAddress($to);
- $mail->Encoding = $mailsetting["mbstringactive"];
- $mail->Subject = $title;
- $mail->Body = "<div align=right>" . $msg . "</div>";
- $mail->WordWrap = 50;
- $mail->Send();
- return null;
- }
- $mail->IsSMTP();
- $mail->Host = $mailsetting["smtp_server"];
- $mail->Port = $mailsetting["smtp_port"];
- $mail->Username = $mailsetting["smtp_account"];
- $mail->Password = $mailsetting["smtp_password"];
- $mail->From = $setting["siteemail"];
- $mail->FromName = $setting["sitename"];
- $mail->AddAddress($to);
- $mail->Subject = $title;
- $mail->Body = "<div align=right>" . $msg . "</div>";
- $mail->Send();
- }
- return;
- }
- function when($expression, $returntrue, $returnfalse = "") {
- return $expression ? ($returntrue) : ($returnfalse);
- }
- function bgclass() {
- global $bgcounter;
- return $bgcounter++ % 2 == 0 ? "odd" : "row";
- }
- function gallery_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_gallery");
- $r = $db->dbarray($S);
- $output["close"] = $r["close"];
- $output["guestview"] = $r["guestview"];
- $output["comments"] = $r["comments"];
- $output["guestcomment"] = $r["guestcomment"];
- $output["rates"] = $r["rates"];
- $output["guestrate"] = $r["guestrate"];
- $output["maxwidth"] = $r["maxwidth"];
- $output["maxheight"] = $r["maxheight"];
- $output["catstatics"] = $r["catstatics"];
- $output["facebook"] = $r["facebook"];
- $output["sendfriend"] = $r["sendfriend"];
- return $output;
- }
- function check_no($param) {
- if (ereg('' . "^[0-9]*\$", $param))
- {
- return true;
- }
- return;
- }
- function format_no($numberf) {
- $mx = floor(strlen($numberf) / 3);
- $sx2 = floor(strlen($numberf) % 3);
- $sx = "";
- $ix = 0;
- $vx = 0;
- $len = strlen($numberf);
- if (0 < $sx2 && 3 < $len)
- {
- $sx .= substr($numberf, 0, $sx2) . ",";
- $mx--;
- if ($mx == 0)
- {
- $sx .= substr($numberf, 1, 3);
- $zx = 1;
- }
- $ix = 1;
- $vx = 1;
- }
- while (0 < $mx && 3 < $len)
- {
- $zx = 1;
- if ($vx == 0 && $mx == 1)
- {
- $sx .= substr($numberf, $sx2, 3);
- }
- else
- {
- $sx .= substr($numberf, $sx2, 3) . ",";
- }
- $mx--;
- if ($vx == 0)
- {
- $ix++;
- $sx2 = $ix * 3;
- }
- else
- {
- $sx2 = $ix * 3;
- $ix++;
- }
- if (!($mx == 0))
- {
- continue;
- }
- $sx .= substr($numberf, $sx2, 3);
- continue;
- }
- if ($zx == 0)
- {
- return $numberf;
- }
- return $sx;
- }
- function sec2hms($sec, $padHours = false) {
- $hms = "";
- $hours = intval(intval($sec) / 3600);
- $hms .= $padHours ? (str_pad($hours, 2, "00", STR_PAD_LEFT) . ":") : ($hours . ":");
- $minutes = intval($sec / 60 % 60);
- $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT) . ":";
- $seconds = intval($sec % 60);
- $hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
- return $hms;
- }
- function format_currency($amount) {
- $amount += 0.000001;
- $amount = round($amount, 2);
- $amount = sprintf("%01.2f", $amount);
- return $amount;
- }
- function format_links($str) {
- $link = @ereg_replace("((http|https|ftp):\\/\\/)(([-_a-zA-Z1-9]+)\\.)+([-_a-zA-Z1-9]{2,3})((/([-_a-zA-Z0-9\\.\\/\\?\\=\\%\\&\\;]+)?)?)", "<a href=\"\\0\" target=\"\\_blank\">\\0</a>", $str);
- $link = str_replace("([_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,3})", "<a href=\"mailto:\\1\">\\1</a>", $str);
- return $link;
- }
- function pages_maker($rows, $limit, $link, $marq = false) {
- global $html;
- if ($marq)
- {
- $mark = "?";
- }
- else
- {
- $mark = "&";
- }
- if ($rows != "0")
- {
- $recored = $_GET[pg] + 1;
- $tpages = intval($rows / $limit);
- if ($rows % $limit)
- {
- $tpages++;
- }
- if ($tpages != 1)
- {
- $o = 1;
- while ($o <= $tpages)
- {
- $newpage = $limit * ($o - 1);
- $thispage = $o;
- $o++;
- continue;
- }
- if ($_GET[pg] != 0)
- {
- $width = "60%";
- }
- else
- {
- $width = "40%";
- }
- $pages .= "
- <div align='center'>\r
- <table border='0' id='table1' cellpadding='0' class='td_border'>\r
- <tr>\r
- <td height='22'>\r
- <p align='center'>" . _PAGES . ('' . " : <span lang='en-us'>" . $tpages . "</span></td>");
- if ($_GET[pg] != 0)
- {
- $first = 0;
- $pages .= "\r
- <td width='100' class='odd' align='center'><a href='" . $link . $markpg . ('' . "=" . $first . "'> <b>") . _FIRST_PAGE . "</b></a></td>";
- }
- if ($_GET[pg] != 0)
- {
- $prev = $_GET[pg] - $limit;
- $pages .= "\r
- <td width='100' class='td_over' align='center'><a href='" . $link . $markpg . ('' . "pg=" . $prev . "'>") . _PREV . "</a></td>";
- }
- if (!($_GET[pg] / $limit + 1 < $tpages) && $tpages != 1)
- {
- $next = $_GET[pg] + $limit;
- $pages .= "\r
- <td width='100' class='td_over' align='center'><a href='" . $link . $markpg . ('' . "pg=" . $next . "'>") . _NEXT . "</a></td>";
- $pages .= "\r
- <td width='100' class='odd' align='center'><a href='" . $link . $markpg . ('' . "pg=" . $newpage . "'> <b>") . _LAST_PAGE . "</b></a></td>";
- }
- return $pages . "</tr>\r
- </table>\r
- </div>";
- }
- }
- return;
- }
- function pages_maker2($rows, $limit, $link, $marq = false) {
- global $html;
- if ($marq)
- {
- $mark = "?";
- }
- else
- {
- $mark = "&";
- }
- if ($rows != "0")
- {
- $recored = $_GET[pg] + 1;
- $tpages = intval($rows / $limit);
- if ($rows % $limit)
- {
- $tpages++;
- }
- if ($tpages != 1)
- {
- $o = 1;
- while ($o <= $tpages)
- {
- $newpage = $limit * ($o - 1);
- $thispage = $o;
- $o++;
- continue;
- }
- if ($_GET[pg] != 0)
- {
- $width = "60%";
- }
- else
- {
- $width = "40%";
- }
- $pages .= '' . "
- <br><div align='center'>\r
- <table border='0' cellpadding='0' class='td_border curved' width=500 dir=rtl>\r
- <tr>\r
- <td height='19'>\r
- <center>ÇáÕÝÍÇÊ : <span lang='en-us'>" . $tpages . "</span></td>";
- if ($_GET[pg] != 0)
- {
- $first = 0;
- $pages .= "\r
- <td width='100' class='odd' align='center'>«<a href='" . $link . ('' . "/pg/" . $first . "'> <b>ÇáÃæáì</b></a></td>");
- }
- if ($_GET[pg] != 0)
- {
- $prev = $_GET[pg] - $limit;
- $pages .= "\r
- <td width='100' class='td_over' align='center'>«<a href='" . $link . ('' . "/pg/" . $prev . "'> ÇáÓÇÈÞ</a></td>");
- }
- if (!($_GET[pg] / $limit + 1 < $tpages) && $tpages != 1)
- {
- $next = $_GET[pg] + $limit;
- $pages .= "\r
- <td width='100' class='td_over' align='center'>»<a href='" . $link . ('' . "/pg/" . $next . "'>ÇáÊÇáí</a></td>");
- $pages .= "\r
- <td width='100' class='odd' align='center'><a href='" . $link . $markpg . ('' . "/pg/" . $newpage . "'> <b>ÇáÃÎíÑÉ</b></a>»</td>");
- }
- return $pages . "</tr>\r
- </table>\r
- </div><div class=clear></div>";
- }
- }
- return;
- }
- function pages_maker_ref($rows, $limit, $link, $marq = false) {
- global $html;
- if ($marq)
- {
- $mark = "?";
- }
- else
- {
- $mark = "&";
- }
- if ($rows != "0")
- {
- $recored = $_GET[pg] + 1;
- $tpages = intval($rows / $limit);
- if ($rows % $limit)
- {
- $tpages++;
- }
- if ($tpages != 1)
- {
- $o = 1;
- while ($o <= $tpages)
- {
- $newpage = $limit * ($o - 1);
- $thispage = $o;
- $o++;
- continue;
- }
- if ($_GET[pg] != 0)
- {
- $width = "60%";
- }
- else
- {
- $width = "40%";
- }
- $pages .= '' . "
- <div align='center'>\r
- <table border='0' id='table1' cellpadding='0' class='td_border'>\r
- <tr>\r
- <td height='22'>\r
- <p align='center'>ÚÏÏ ÇáÕÝÍÇÊ : <span lang='en-us'>" . $tpages . "</span></td>";
- if ($_GET[pg] != 0)
- {
- $first = 0;
- $pages .= "\r
- <td width='100' class='odd' align='center'><a href='" . $link . $markpg . ('' . "=" . $first . "'>« <b>ÇáÃæáì</b></a></td>");
- }
- if ($_GET[pg] != 0)
- {
- $prev = $_GET[pg] - $limit;
- $pages .= "\r
- <td width='100' class='td_over' align='center'><a href='" . $link . $markpg . ('' . "pg=" . $prev . "'>ÇáÓÇÈÞ</a></td>");
- }
- if (!($_GET[pg] / $limit + 1 < $tpages) && $tpages != 1)
- {
- $next = $_GET[pg] + $limit;
- $reflink = $link . $markpg . ('' . "pg=" . $next);
- $pages .= "\r
- <td width='100' class='td_over' align='center'><a href='" . $link . $markpg . ('' . "pg=" . $next . "'>ÇáÊÇáí</a></td>");
- $pages .= "\r
- <td width='100' class='odd' align='center'><a href='" . $link . $markpg . ('' . "pg=" . $newpage . "'>» <b>ÇáÃÎíÑÉ</b></a></td>");
- return '' . "\r
- <script>\r
- \$(\"html, body\").animate({ scrollTop: \$(document).height() }, \"slow\");\r
- </script>\r
- <span style='color:blue; padding:5px;'><img src='images/smallloading.gif' border=0> ÌÇÑí ÅÑÓÇá ÏÝÚÉ ÃÎÑì (" . format_no($next + $limit) . " / " . format_no($rows) . ('' . ")....</span>\r
- <meta http-equiv='refresh' content=5;URL='" . $reflink . "'>");
- }
- }
- }
- return;
- }
- function fetch_loginbox($url = false) {
- @extract($GLOBALS);
- global $loginbox;
- global $username;
- global $userid;
- global $numoffolders;
- global $numoffiles;
- global $sure;
- $sure = "return confirm('åá ÃäÊ æÇËÞ ãä ÇáÎÑæÌ¿')";
- if (!$_SESSION["valid_login"])
- {
- $loginbox = "
- <form action=\"hooks.php?called=members&do=login\" method=post>
- ";
- $loginbox .= '' . "<input type=\"hidden\" name=\"url\" value=\"" . $url . "\">
- ";
- $loginbox .= $tmps->get_temponly("loginbox");
- $loginbox .= "
- </form>";
- return null;
- }
- $userD = userdetails($_SESSION["valid_login"]);
- $username = $userD["username"];
- $userid = intval($userD["userid"]);
- $Sups = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "uploads WHERE userid='" . $userid . "'");
- $numoffiles = format_no($db->dbrows($Sups));
- $db->dbclose($Sups);
- $Sfolders = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "uploadfolders WHERE userid='" . $userid . "'");
- $numoffolders = format_no($db->dbrows($Sfolders));
- $db->dbclose($Sfolders);
- if ($userD["active"] == "0")
- {
- $loginbox = $tmps->get_temponly("welcomebox");
- return null;
- }
- $loginbox = "
- <form action=\"activemembership\" method=post>
- ";
- $loginbox .= '' . "<input type=\"hidden\" name=\"url\" value=\"" . $url . "\">
- ";
- $loginbox .= "<b>ßæÏ ÇáÊÝÚíá</b>:<br /> ãä ÝÖáß ÖÚ ßæÏ ÇáÊÝÚíá ÇáÐí æÕáß Úáì ÈÑíÏß ÇáÅáßÊÑæäí<br />";
- $loginbox .= "<input type='text' name='usercode' size=20><br />";
- $loginbox .= "
- <input type='submit' value='ÊÝÚíá' class=submit>";
- $loginbox .= "
- <input type='button' onClick=\"location.href='resendcode'\" class=submit value='ÃÑÓá áí ÇáßæÏ '>";
- $loginbox .= "
- </form>";
- return;
- }
- function gallery_tools($id, $title = false) {
- global $db;
- global $REQUEST_URI;
- global $RA;
- global $__config;
- $id = intval($id);
- $id = xss_clean($id);
- $setting = setting();
- $G = gallery_setting();
- $url = $__config["config"]["siteurl"] . ('' . "/hooks.php?called=gallery&id=" . $id);
- $start = "
- <div align=center><table border=0 width=100% cellspacing=2><tr><td>";
- $end = "</td></tr></table></div>";
- $FB_link = "http://www.facebook.com/sharer.php?u=" . $url . "&title=" . urlencode($title);
- $download = "<a onclick=\"getdownloads('ajax.php?cat=gallery&do=downloads&id=" . $id . "')\" title=\"ÍÝÙ ÇáÕæÑÉ\" href=\"images.php?cat=gallery&id=" . $id . "\"><img src=\"styles/" . $setting[style] . "/images/icons/download.gif\" border=0></a>";
- if ($G["facebook"] == "0")
- {
- $facebook = " <a onclick=\"getfacebook('ajax.php?cat=gallery&do=facebook&id=" . $id . "');javascript:popUp('" . $FB_link . "')\" style=\"cursor:pointer\" title=\"ãÔÇÑßÉ Úáì Facebook\"><img src=\"styles/" . $setting[style] . "/images/icons/facebook.gif\" border=0></a>";
- }
- else
- {
- $facebook = "";
- }
- $view = " <a title=\"ãÔÇåÏÉ ÇáÊÝÇÕíá\" href=\"hooks.php?called=gallery&id=" . $id . "\"><img src=\"styles/" . $setting[style] . "/images/icons/view.gif\" border=0></a>";
- if ($G["sendfriend"] == "0")
- {
- $send = " <a title=\"ÃÑÓá áÕÏíÞ\" href=\"javascript:sendfriend('hooks.php?called=gallery&do=send&id=" . $id . "')\"><img src=\"styles/" . $setting[style] . "/images/icons/sendfriend.gif\" border=0></a>";
- }
- else
- {
- $send = "";
- }
- if (USERID != "0" && USERID != "")
- {
- $output = $download . $view . $rate . $facebook . $send;
- }
- else
- {
- $output = $download;
- if ($G["guestview"] == "0")
- {
- $output .= $view;
- }
- if ($G["guestrate"] == "0")
- {
- $output .= $rate;
- }
- $output .= $facebook . $send;
- }
- return $start . $output . $end;
- }
- function headers_nocach() {
- @header("Cache-Control: no-cache, must-revalidate");
- @header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
- return;
- }
- function fl_header_ref($url) {
- if (@header("Location: " . $url))
- {
- @header("Location: " . $url);
- return null;
- }
- echo "<script>location.href='" . $url . "'</script>";
- return;
- }
- function fl_valid_email($email) {
- return preg_match("#^[a-z0-9.!\\#\$%&'*+-/=?^_`{|}~]+@([0-9.]+|([^\\s'\"<>]+\\.+[a-z]{2,6}))\$#si", $email);
- }
- function market_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_market");
- $r = $db->dbarray($S);
- $output["close"] = $r["close"];
- $output["guestsoffer"] = $r["guestsoffer"];
- $output["guestsrequest"] = $r["guestsrequest"];
- $output["reqadmin1"] = $r["reqadmin1"];
- $output["reqadmin2"] = $r["reqadmin2"];
- $output["buy_sell"] = $r["buy_sell"];
- $output["docyes"] = $r["docyes"];
- $output["youtube"] = $r["youtube"];
- $output["picscount"] = $r["picscount"];
- $output["vendordetails"] = $r["vendordetails"];
- $output["clientdetails"] = $r["clientdetails"];
- return $output;
- }
- function check_close() {
- global $tmps;
- global $sitemsg;
- global $body;
- global $navbar;
- global $pagetitle;
- $setting = setting();
- if ($setting["closesite"] == "1")
- {
- $navbar = str_replace("{style}", $setting[style], HOUSEIMG) . " <a href='index.php'>ÇáÑÆíÓíÉ</a> ";
- $navbar .= str_replace("{style}", $setting[style], NAVIMG) . " ÇáãæÞÚ ãÛáÞ ãÄÞÊÇ ";
- $pagetitle = "ãÛáÞ";
- $tmps->getHtml("header");
- $sitemsg = nl2br($setting["siteclosemsg"]);
- $body = $tmps->get_temponly("msg");
- $tmps->getHtml("body");
- $tmps->getHtml("footer");
- exit();
- }
- return;
- }
- function upload_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_uploads Limit 1");
- $r = $db->dbarray($S);
- $output["close"] = $r["browsepics"];
- $output["urlcopy"] = $r["urlcopy"];
- $output["exts"] = $r["exts"];
- $output["guestsup"] = $r["guestsup"];
- $output["overlineword"] = $r["overlineword"];
- $output["maxsize1"] = $r["maxsize1"];
- $output["maxsize2"] = $r["maxsize2"];
- $output["typesblock"] = $r["typesblock"];
- $output["extsblock"] = $r["extsblock"];
- $output["facebook"] = $r["facebook"];
- $output["userfolders"] = $r["userfolders"];
- $output["cpa"] = $r["cpa"];
- return $output;
- }
- function Auto_update($url, $c) {
- echo "<s";
- echo "cript type=\"text/javascript\">\r
- function Ajax(){\r
- var xmlHttp;\r
- try{ \r
- xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari\r
- }\r
- catch (e){\r
- try{\r
- xmlHttp=new ActiveXObject(\"Msxml2.XMLHTTP\"); // Internet Explorer\r
- }\r
- catch (e){\r
- try{\r
- xmlHttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\r
- }\r
- catch (e){\r
- alert(\"No AJAX!?\");\r
- return false;\r
- }\r
- }\r
- }\r
- \r
- xmlHt";
- echo "tp.onreadystatechange=function(){\r
- if(xmlHttp.readyState==4){\r
- document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText;\r
- setTimeout('Ajax()',";
- echo $c;
- echo ");\r
- }\r
- }\r
- xmlHttp.open(\"GET\",\"";
- echo $url;
- echo "\",true);\r
- xmlHttp.send(null);\r
- }\r
- \r
- window.onload=function(){\r
- setTimeout('Ajax()',";
- echo $c;
- echo ");\r
- }\r
- </script>\r
- \r
- \r
- </body>\r
- </html>\r
- ";
- return;
- }
- function rewrite_image($id) {
- global $db;
- $id = intval($id);
- $id = xss_clean($id);
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . ('' . "uploads WHERE id='" . $id . "' Limit 1"));
- $r = $db->dbarray($S);
- if ($r[picdata] == "")
- {
- if (!(!(!($r[pictype] == "image/jpeg") && $r[pictype] == "image/jpg") && $r[pictype] == "image/gif") && $r[pictype] == "image/png")
- {
- $path = "t" . $id . xss_clean($r[picname]);
- }
- else
- {
- $path = "u" . $id . xss_clean($r[picname]);
- }
- }
- else
- {
- $path = "u" . $id . xss_clean($r[picname]);
- }
- return $path;
- }
- function check_user_session($url) {
- global $tmps;
- global $pagetitle;
- global $body;
- global $navbar;
- $setting = setting();
- $userid = intval($_SESSION["valid_login"]);
- if (!($userid == "") && $userid == "0")
- {
- $pagetitle = "ÊÓÌíá ÏÎæá";
- $tmps->getHtml("header");
- $navbar = str_replace("{style}", $setting[style], HOUSEIMG) . " <a href='index.php'>ÇáÑÆíÓíÉ</a> ";
- $navbar .= str_replace("{style}", $setting[style], NAVIMG) . " ÊÓÌíá ÏÎæá";
- $body = "
- <form action=\"hooks.php?called=members&do=login\" method=post>
- ";
- $body .= '' . "<input type=\"hidden\" name=\"url\" value=\"" . $url . "\">
- ";
- $body .= $tmps->get_temponly("loginbox");
- $body .= "
- </form>";
- $tmps->getHtml("body");
- $tmps->getHtml("footer");
- exit();
- }
- return;
- }
- function psp_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_psp Limit 1");
- $r = $db->dbarray($S);
- $output["close"] = $r["close"];
- $output["download"] = $r["guestsdownload"];
- $output["comment"] = $r["guestscomment"];
- $output["rate"] = $r["guestsrate"];
- $output["friend"] = $r["guestsfriend"];
- $output["facebook"] = $r["facebook"];
- $output["torrent"] = $r["gueststorrent"];
- $output["showdetails"] = $r["guestsshowdetails"];
- return $output;
- }
- function videos_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_video");
- $r = $db->dbarray($S);
- $output["close"] = $r["close"];
- $output["guestview"] = $r["guestview"];
- $output["facebook"] = $r["facebook"];
- $output["votes"] = $r["votes"];
- $output["themecolor"] = $r["themecolor"];
- $output["fullscreen"] = $r["fullscreen"];
- $output["autostart"] = $r["autostart"];
- $output["playerheight"] = $r["playerheight"];
- $output["playerwidth"] = $r["playerwidth"];
- $output["volume"] = $r["volume"];
- $output["txtcolor"] = $r["txtcolor"];
- $output["scrollcolor"] = $r["scrollcolor"];
- $output["videologo"] = $r["videologo"];
- return $output;
- }
- function _ago($tm, $rcs = 0) {
- $cur_tm = time();
- $dif = $cur_tm - $tm;
- $pds = array(_SEC, _MIN, _HRS, _DAYS, _WEEKS, _MONTHS, _YEARS, "decade");
- $lngh = array(1, 60, 3600, 86400, 604800, 2630880, 31570560, 315705600);
- $v = sizeof($lngh) - 1;
- while (0 <= $v && ($no = $dif / $lngh[$v]) <= 1)
- {
- $v--;
- continue;
- }
- if ($v < 0)
- {
- $v = 0;
- }
- $_tm = $cur_tm - $dif % $lngh[$v];
- $no = floor($no);
- if ($no != 1)
- {
- $pds[$v] .= "";
- }
- $x = sprintf("%d %s ", $no, $pds[$v]);
- if ($rcs == 1 && 1 <= $v && 0 < $cur_tm - $_tm)
- {
- $x .= time_ago($_tm);
- }
- return $x;
- }
- function arcades_setting() {
- global $db;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_arcades");
- $r = $db->dbarray($S);
- $output["close"] = $r["close"];
- $output["facebook"] = $r["facebook"];
- $output["rates"] = $r["rates"];
- $output["welcomemsg"] = $r["welcomemsg"];
- $output["statics"] = $r["statics"];
- $output["favlist"] = $r["favlist"];
- return $output;
- }
- function fetch_arcade_byname($name) {
- global $db;
- $name = strip_tags($name);
- $name = xss_clean($name);
- $filename = $name . "swf";
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . ('' . "arcadegames WHERE gamename='" . $name . "' Limit 1"));
- if ($db->dbrows($S) != "0")
- {
- $r = $db->dbarray($S);
- $output["gamename"] = xss_clean($r["gamename"]);
- $output["catid"] = intval($r["catid"]);
- $output["id"] = intval($r["id"]);
- $output["filename"] = xss_clean($r["filename"]);
- $output["highscore"] = xss_clean($r["highscore"]);
- }
- else
- {
- $output["gamename"] = "ÎØÃ";
- }
- return $output;
- }
- function members_setting() {
- global $db;
- if (!($S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "setting_members")))
- {
- die(mysql_error());
- }
- $r = $db->dbarray($S);
- $output["close"] = $r["close"];
- $output["minchar"] = $r["minchar"];
- $output["maxchar"] = $r["maxchar"];
- $output["emailactive"] = $r["emailactive"];
- $output["emailwelcome"] = $r["emailwelcome"];
- return $output;
- }
- function set_sessions($url = false) {
- global $db;
- global $PHP_SELF;
- $ip = GetRealIP();
- if ($_SESSION["valid_login"])
- {
- $userid = intval($_SESSION["valid_login"]);
- }
- else
- {
- $userid = "0";
- }
- if (!($Ssession = $db->dbquery("select * from " . TABLE_PREFIX . "sessions")))
- {
- die($db->__DBerror());
- }
- if ($db->dbrows($Ssession) != 0)
- {
- while ($rse = $db->dbarray($Ssession))
- {
- $time_now = time();
- $time_before = $time_now - 250;
- $SET_time = $db->dbquery("delete from " . TABLE_PREFIX . ('' . "sessions where dateline < " . $time_before));
- $db->dbclose($SET_time);
- continue;
- }
- }
- if (isset($_GET["c"]))
- {
- $c = xss_clean($_GET["c"]);
- }
- else
- {
- $c = "";
- }
- $refer = $PHP_SELF;
- $u = selfURL();
- if (!($IIIIIIII = $db->dbquery("insert into " . TABLE_PREFIX . ('' . "sessions values\r
- (null,'" . $userid . "','" . $ip . "','" . $u . "','") . $c . "','" . time() . "')")))
- {
- die(mysql_error());
- }
- $db->dbclose($IIIIIIII);
- $db->dbclose($Ssession);
- return;
- }
- function GetRealIP() {
- if (!empty($_SERVER["HTTP_CLIENT_IP"]))
- {
- $ip = $_SERVER["HTTP_CLIENT_IP"];
- }
- else
- {
- if (!empty($_SERVER["HTTP_X_FORWARDED_FOR"]))
- {
- $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
- }
- else
- {
- $ip = $_SERVER["REMOTE_ADDR"];
- }
- }
- return $ip;
- }
- function check_access_hook($hookid, $adminid) {
- global $db;
- global $adminjob;
- $hooid = intval($hookid);
- $hookid = xss_clean($hookid);
- $adminid = intval($adminid);
- $adminid = xss_clean($adminid);
- $admin = admindetails($adminid);
- if ($adminjob->_is_hook($hookid, $admin["hooks"]) == "NO")
- {
- $adminjob->cpstarthtml("ÑÇÈØ ÎØÃ");
- $adminjob->__errorlink("ÑÈãÇ áÇ Êãáß ÇáÕáÇÍíÉ áÏÎæá åÐå ÇáÕÝÍÉ");
- $adminjob->cpendhtml();
- exit();
- }
- return;
- }
- function check_admin_full_access($adminid) {
- global $db;
- global $adminjob;
- $adminid = intval($adminid);
- $adminid = xss_clean($adminid);
- $admin = admindetails($adminid);
- if ($admin["access"] != "0")
- {
- $adminjob->cpstarthtml("ÑÇÈØ ÎØÃ");
- $adminjob->__errorlink("ÑÈãÇ áÇ Êãáß ÇáÕáÇÍíÉ áÏÎæá åÐå ÇáÕÝÍÉ");
- $adminjob->cpendhtml();
- exit();
- }
- return;
- }
- function video_marque() {
- global $db;
- global $video_marque;
- global $__config;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "videos ORDER BY id DESC Limit 10");
- if ($db->dbrows($S) != "0")
- {
- $video_marque = "<marquee scrollamount='4' scrolldelay='89' onmouseover='this.stop()' onmouseout='this.start()'>";
- $video_marque .= "<table border=0 width=100% cellspacing=2><tr>";
- while ($r = $db->dbarray($S))
- {
- $imgdesc = xss_clean($r["title"]);
- $videocode = $r[videocode];
- if ($r[videopath] == "YOUTUBE")
- {
- $picpath = '' . "http://img.youtube.com/vi/" . $videocode . "/default.jpg";
- }
- else
- {
- $picpath = $__config["config"]["storage"] . "/" . $__config["config"]["thumbnails"] . "/video_flvf_" . $r[dateline] . ".jpg";
- }
- $video_marque .= "<td valign=top width=115 heigth=100><center>";
- $video_marque .= "<a href='videos-v-" . $r[id] . "?" . $r[title] . "'>";
- $video_marque .= '' . "<img class=\"reflect rheight30\" src='" . $picpath . "' border=0 title='" . $imgdesc . "' alt='" . $imgdesc . "' width=110 height=90></a>";
- $video_marque .= "<br />" . $r[duration] . "</center></td>";
- continue;
- }
- $video_marque .= "</tr></table></marquee>";
- }
- else
- {
- $video_marque = "<center>áÇ ÊæÌÏ ÝíÏíæåÇÊ</center>";
- }
- $video_marque .= "<script>\r
- var cool = 2;\r
- function varyReflect() {\r
- if (cool == 10) {\r
- cool = 1;\r
- }\r
- Reflection.add(document.getElementById('indeed'), { opacity: cool/10 });\r
- \r
- document.getElementById('indeeda').innerHTML = cool*10;\r
- cool++;\r
- }\r
- \r
- </script>";
- return "<script src='js/reflection.js'></script>" . $video_marque;
- }
- function video_watchs_block() {
- global $db;
- global $__config;
- $S = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "sessions WHERE videocode!='' Limit 10");
- if ($db->dbrows($S) != "0")
- {
- $output .= "<table border=0 width=100% cellspacing=2>";
- while ($r = $db->dbarray($S))
- {
- $Sv = $db->dbquery("SELECT * FROM " . TABLE_PREFIX . "videos WHERE id='" . xss_clean(intval($r["videocode"])) . "'");
- if (!($db->dbrows($Sv) != "0"))
- {
- continue;
- }
- $rv = $db->dbarray($Sv);
- $videocode = $rv[videocode];
- if ($rv[videopath] == "YOUTUBE")
- {
- $picpath = '' . "http://img.youtube.com/vi/" . $videocode . "/default.jpg";
- }
- else
- {
- $picpath = $__config["config"]["storage"] . "/" . $__config["config"]["thumbnails"] . "/video_flvf_" . $rv[dateline] . ".jpg";
- }
- $imgdesc = xss_clean($rv["title"]);
- $output .= "
- <tr onmouseover=\"this.className='td_over'\" onmouseout=\"this.className=''\"\r
- ><td width=40 height=35><center>";
- $output .= '' . "
- <div style=\"float: left; padding: 10px;\">\r
- <img src='" . $picpath . "' border=0 title='" . $imgdesc . "' alt='" . $imgdesc . "' width=35 height=30></div>";
- $output .= "
- </td><td class=><a href='videos-v-" . $rv[id] . "?" . urlencode($rv[title]) . "'>" . $imgdesc . "</a>\r
- <br />" . $rv[duration] . "</center></td></tr>";
- continue;
- }
- $output .= "
- </table>";
- }
- else
- {
- $output = "<center>áÇ íæÌÏ ÇáÂä</center>";
- }
- return $output;
- }
- function fetch_tags($appid) {
- global $db;
- $terms = array();
- $maximum = 0;
- $query = $db->dbquery('' . "SELECT term, counter FROM tags WHERE appid='" . $appid . "' ORDER BY counter DESC LIMIT 30");
- if ($db->dbrows($query) != "0")
- {
- while ($row = $db->dbarray($query))
- {
- $term = $row["term"];
- $counter = $row["counter"];
- if ($maximum < $counter)
- {
- $maximum = $counter;
- }
- $terms[] = array("term" => $term, "counter" => $counter);
- continue;
- }
- shuffle($terms);
- }
- $db->dbclose($query);
- foreach ($terms as $k)
- {
- $percent = floor($k["counter"] / $maximum * 100);
- if ($percent < 20)
- {
- $class = "smallest";
- }
- else
- {
- if (20 <= $percent && $percent < 40)
- {
- $class = "small";
- }
- else
- {
- if (40 <= $percent && $percent < 60)
- {
- $class = "medium";
- }
- else
- {
- if (60 <= $percent && $percent < 80)
- {
- $class = "large";
- }
- else
- {
- $class = "largest";
- }
- }
- }
- }
- $output .= "<a href=\"search.php?qu=" . urlencode($k["term"]) . ('' . "\"><span class=\"" . $class . "\">") . $k["term"] . "</span></a>
- ";
- continue;
- }
- $output .= "</div>\r
- </div>
- ";
- return $output;
- }
- function get_domain() {
- @extract($GLOBALS);
- $domain = $_SERVER["HTTP_HOST"];
- return $domain;
- }
- function Encode($data, $pwd) {
- $pwd_length = strlen($pwd);
- $i = 0;
- while ($i < 255)
- {
- $key[$i] = ord(substr($pwd, $i % $pwd_length + 1, 1));
- $counter[$i] = $i;
- $i++;
- continue;
- }
- $i = 0;
- .....................................................................
- ...............................
- ............
Add Comment
Please, Sign In to add comment