function inverseHex($color) { $color = TRIM($color); $prependHash = FALSE; if (STRPOS($color, '#') !== FALSE) { $prependHash = TRUE; $color = STR_REPLACE('#', NULL, $color); } switch ($len = STRLEN($color)) { case 3: $color = PREG_REPLACE("/(.)(.)(.)/", "\\1\\1\\2\\2\\3\\3", $color); case 6: break; default: TRIGGER_ERROR("Invalid hex length ({$len}). Must be (3) or (6)", E_USER_ERROR); } if (!PREG_MATCH('/[a-f0-9]{6}/i', $color)) { $color = HTMLENTITIES($color); TRIGGER_ERROR("Invalid hex string #{$color}", E_USER_ERROR); } $r = DECHEX(255 - HEXDEC(SUBSTR($color, 0, 2))); $r = STRLEN($r) > 1 ? $r : '0' . $r; $g = DECHEX(255 - HEXDEC(SUBSTR($color, 2, 2))); $g = STRLEN($g) > 1 ? $g : '0' . $g; $b = DECHEX(255 - HEXDEC(SUBSTR($color, 4, 2))); $b = STRLEN($b) > 1 ? $b : '0' . $b; return ($prependHash ? '#' : NULL) . $r . $g . $b; }
function ENCRYPT_DECRYPT($Str_Message) { //Function : encrypt/decrypt a string message v.1.0 without a known key //Author : Aitor Solozabal Merino (spain) //Email : aitor-3@euskalnet.net //Date : 01-04-2005 $Len_Str_Message = STRLEN($Str_Message); $Str_Encrypted_Message = ""; for ($Position = 0; $Position < $Len_Str_Message; $Position++) { // long code of the function to explain the algoritm //this function can be tailored by the programmer modifyng the formula //to calculate the key to use for every character in the string. $Key_To_Use = $Len_Str_Message + $Position + 1; // (+5 or *3 or ^2) //after that we need a module division because can´t be greater than 255 $Key_To_Use = (255 + $Key_To_Use) % 255; $Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1); $Ascii_Num_Byte_To_Encrypt = ORD($Byte_To_Be_Encrypted); $Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use; //xor operation $Encrypted_Byte = CHR($Xored_Byte); $Str_Encrypted_Message .= $Encrypted_Byte; //short code of the function once explained //$str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255)); } return $Str_Encrypted_Message; }
/** * List letters A-Z Based on posts in the database */ function fivebeers_aznav() { $num = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); $alphabet = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); global $wpdb; $myposts = $wpdb->get_results("SELECT post_title FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_title"); $n[] = ''; foreach ($myposts as $mypost) { $n[] = strtoupper(SUBSTR(trim($mypost->post_title), 0, 1)); } $output = '<div id="aznav"><div class="nav-links azindex">'; //$output = '<div id="aznav"><div class="nav-links azindex">'; for ($i = 0; $i < count($num); $i++) { if (in_array($num[$i], $n)) { $number = true; break; } } if (isset($number)) { $output .= '<a href="#" class="alphabet azindex" rel="num">0-9</a>'; } else { $output .= '<span class="alphabet current">0-9</span>'; } for ($i = 0; $i < count($alphabet); $i++) { if (in_array($alphabet[$i], $n)) { $output .= '<a href="#" class="alphabet azindex" rel="' . $alphabet[$i] . '">' . $alphabet[$i] . '</a>'; } else { $output .= '<span class="alphabet current">' . $alphabet[$i] . '</span>'; } } $output .= '</div><div style="clear:both"></div>'; echo $output; }
private function getImageColor($params) { $transparency = intval($params->get('wordleTransparency', 127)); $backgroundColor = $params->get('wordleBackgroundColor', '000000'); $imageColor = array(HEXDEC(SUBSTR($backgroundColor, 0, 2)), HEXDEC(SUBSTR($backgroundColor, 2, 2)), HEXDEC(SUBSTR($backgroundColor, 4, 2)), $transparency); return $imageColor; }
function convertdate($datadate) { $month = array('มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'); $day = SUBSTR($datadate, 8, 2); $mon = SUBSTR($datadate, 5, 2); $year = SUBSTR($datadate, 0, 4); $mix = $day . ' ' . $month[$mon - 1] . ' ' . $year; return $mix; }
function changeWidgetDir($newDir) { $defaultDir = str_replace('//', '/', str_replace('\\', '/', dirname(plugin_dir_path(__FILE__)))) . '/custom-widgets/'; if (empty($newDir) || get_option('preset-cdwd') == TRUE || get_option('widgetdir') == '/') { $newDir = $defaultDir; $dirchange = TRUE; } $newDir = str_replace('//', '/', str_replace('\\', '/', $newDir)); $wpdir = str_replace('//', '/', str_replace('\\', '/', wp_upload_dir())); $plugindir = str_replace('//', '/', str_replace('\\', '/', dirname(plugin_dir_path(__FILE__)))); if (WPWM_DEBUG == 1) { $error = TRUE; $errmsg = "Debug Mode enabled, unrestricted directory changes permitted"; } else { if (strstr($newDir, $plugindir) == FALSE) { $error = TRUE; $errmsg = " ERROR-Custom Widget Directory must be within Wordpress manager plugin directory. The default had been set instead of " . $newDir . '<br/>'; $newDir = dirname(plugin_dir_path(__FILE__)) . '/custom-widgets/'; $dirchange = TRUE; } } $dirchange = TRUE; $newDir = str_replace('//', '/', str_replace('\\', '/', $newDir)); if (file_exists($newDir) == FALSE) { $dirDiff = true; mkdir($newDir, 0755); $user = exec(whoami); chown($newDir, $user); } $sourceDir = get_option('widgetdir'); if (file_exists($sourceDir)) { $sourceDir = str_replace('//', '/', str_replace('\\', '/', $sourceDir)); if (strcmp($sourceDir, $wpdir['basedir']) != 0) { $contents = scandir($sourceDir); if (SUBSTR($newDir, -1) != '/') { $newDir .= '/'; } foreach ($contents as $widgets) { if ($widgets != "." && $widgets != "..") { recurse_copy($sourceDir, $newDir); } } if ($sourceDir != $newDir) { if ($sourceDir != $defaultDir) { $check = recursiveRemove($sourceDir); } } } } update_option('widgetdir', $newDir); msgDisplay($error, $errmsg, $dirchange, $dirDiff); }
function formataValorExibir($valor) { $valor = formataValorBanco($valor); $arrayValor = explode(".", $valor); if (isset($arrayValor[1])) { $arrayValor[1] = SUBSTR($arrayValor[1], 0, 2); $valor = $arrayValor[0] . "." . $arrayValor[1]; } if (strpos($valor, ".") > 0 && strpos($valor, ",") > 0) { $valor = str_replace(",", ".", str_replace(".", "", $valor)); } return number_format($valor, 2, ",", "."); }
function ENCRYPT_DECRYPT($Str_Message) { $Len_Str_Message = STRLEN($Str_Message); $Str_Encrypted_Message = ""; for ($Position = 0; $Position < $Len_Str_Message; $Position++) { $Key_To_Use = $Len_Str_Message + $Position + 1; // (+5 or *3 or ^2) $Key_To_Use = (255 + $Key_To_Use) % 255; $Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1); $Ascii_Num_Byte_To_Encrypt = ORD($Byte_To_Be_Encrypted); $Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use; //xor operation $Encrypted_Byte = CHR($Xored_Byte); $Str_Encrypted_Message .= $Encrypted_Byte; } return $Str_Encrypted_Message; }
function DayOfWeek($d, $short = False) { if ($d == 1) { $day = "Monday"; } elseif ($d == 2) { $day = "Tuesday"; } elseif ($d == 3) { $day = "Wednesday"; } elseif ($d == 4) { $day = "Thursday"; } elseif ($d == 5) { $day = "Friday"; } elseif ($d == 6) { $day = "Saturday"; } elseif ($d == 7) { $day = "Sunday"; } if ($short) { return SUBSTR($day, 0, 3); } else { return $day; } }
function ENCRYPT_DECRYPT($Str_Message) { $Len_Str_Message = STRLEN($Str_Message); $Str_Encrypted_Message = ""; for ($Position = 0; $Position < $Len_Str_Message; $Position++) { // long code of the function to explain the algoritm //this function can be tailored by the programmer modifyng the formula //to calculate the key to use for every character in the string. $Key_To_Use = ($Len_Str_Message + $Position) * 230; // (+5 or *3 or ^2) //after that we need a module division because can´t be greater than 255 //$Key_To_Use = (255+$Key_To_Use) % 255; $Key_To_Use = (168 + $Key_To_Use) % 168; $Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1); $Ascii_Num_Byte_To_Encrypt = ORD($Byte_To_Be_Encrypted); $Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use; //xor operation $Encrypted_Byte = CHR($Xored_Byte); $Str_Encrypted_Message .= $Encrypted_Byte; //short code of the function once explained //$str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255)); } return $Str_Encrypted_Message; }
} else { if ($mision == "") { header("location:addAboutUs.php?errorMsg=Mision must be filled!"); } else { if ($web == "") { header("location:addAboutUs.php?errorMsg=Link Web must be filled!"); } else { if ($book == "") { header("location:addAboutUs.php?errorMsg=Link Book must be filled!"); } else { $count = mysql_query("SELECT ID_Aboutus as 'Flag' FROM aboutus ORDER BY ID_Aboutus DESC LIMIT 1") or die(mysql_error()); $temp; while ($row = mysql_fetch_array($count)) { $temp = $row[0]; } if (SUBSTR(strval($temp), 3, -5) == strval(date("y"))) { mysql_query("INSERT INTO aboutus VALUES (\n\t\t\tCONCAT('ABT', SUBSTRING(YEAR(CURRENT_TIMESTAMP),3,2), \n\t\t\tLPAD((SUBSTR((SELECT au.ID_Aboutus FROM aboutus au ORDER BY au.ID_Aboutus DESC LIMIT 1),6) + 1 ), 5, 0)),\n\t\t\t'" . $name . "','" . $address . "','" . $telp . "','" . $email . "','" . $about . "','" . $concept . "','" . $vision . "','" . $mision . "','" . $web . "','" . $book . "'"); } else { mysql_query("INSERT INTO aboutus VALUES (\n\t\t\tCONCAT('ABT', SUBSTRING(YEAR(CURRENT_TIMESTAMP),3,2), '00001'),\n\t\t\t'" . $name . "','" . $address . "','" . $telp . "','" . $email . "','" . $about . "','" . $concept . "','" . $vision . "','" . $mision . "','" . $web . "','" . $book . "'"); } header("location:aboutus.php"); } } } } } } } } } }
function style($title, $color) { $new_title = html_entity_decode(strip_tags($title)); $number = $new_title[0]; $first_letter = $new_title[1]; $ev_title = $title; $color = str_replace('#', '', $color); $bg_color = 'rgba(' . HEXDEC(SUBSTR($color, 0, 2)) . ',' . HEXDEC(SUBSTR($color, 2, 2)) . ',' . HEXDEC(SUBSTR($color, 4, 2)) . ',0.3' . ')'; $event = '<div id="cal_event" style="background-color:' . $bg_color . ' !important;border-left:2px solid #' . $color . ' "><p>' . $ev_title . '</p></div>'; return $event; }
$numerop = 0; $numeroh = 0; echo "<center>DocuImage - WEB <BR> CONTROL DOCUMENTOS DE CORRESPONDENCIA</center>"; echo "<table border=1 width=100%>"; echo "<td width=55%>"; echo "<br>"; $isql = "select USUA_LOGIN,USUA_PASW from usuario where USUA_LOGIN ='******'"; $resultado = ora_parse($cursor, $isql); $resultado = ora_exec($cursor); $row = array(); ora_fetch_into($cursor, $row, ORA_FETCHINTO_NULLS | ORA_FETCHINTO_ASSOC); //echo $row["usuario"].$krd; echo "<font size=1>Usuario " . $row["USUA_LOGIN"] . "<br>"; if (trim($row["USUA_LOGIN"]) == trim($krd)) { $contraxx = $row["USUA_PASW"]; if (trim($contraxx) == SUBSTR(md5(trim($drd)), 1, 26)) { $iusuario = " and us_usuario='{$krd}'"; $isql = "select * from radicado where carp_codi={$carpeta}"; echo $isql; //$isql ="select * from radicado_rd where rd_estado=5 $iusuario "; // $result1 = ora_do($handle,$isql); ora_parse($cursor, $isql); ora_exec($cursor); $numerot = ora_numrows($cursor); $row = array(); echo "<table border=1>"; while ($result1 = ora_fetch_into($cursor, $row, ORA_FETCHINTO_NULLS | ORA_FETCHINTO_ASSOC)) { $row1 = array(); //$data = trim(ora_getcolumn($cursor, 1)); $data = trim($row["RADI_NUME_RADI"]); $numdata = trim($row["CARP_CODI"]);
<th>Waktu</th> <th>Aksi</th> </tr> </thead> <?php foreach ($kotakkeluar->result() as $row) { ?> <tbody> <tr> <th><?php echo $row->Penerima; ?> </th> <td><?php echo SUBSTR($row->Pesan, 0, 20) . '...'; ?> </td> <th><?php echo $row->Waktu; ?> </th> <td> <a type="button" class="btn btn-primary btn-xs" data-toggle="modal" href=".bs-example-modal-lg<?php echo $row->IdPesan; ?> "><i class="fa fa-folder"></i> View</a> <!--Modal-->
<?php session_start(); $page = SUBSTR(strrchr($_SERVER["REQUEST_URI"], '/'), 1); if ($page != "install.php" && !file_exists(dirname(__FILE__) . '/config.php')) { header("location: install.php"); die; } function timer($runtime) { $hours = floor($runtime / 60); // No. of mins/60 to get the hours and round down $mins = $runtime % 60; // No. of mins/60 - remainder (modulus) is the minutes return $hours . " hrs " . $mins . " mins"; } function isloggedin() { return isset($_SESSION['tmdb_username']); } function updatesite($db_name, $db_host, $db_username, $db_password) { } function sanitize($string, $force_lowercase = true, $anal = true) { $strip = array("~", "`", "!", "@", "#", "\$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]", "}", "\\", "|", ";", ":", "\"", "'", "‘", "’", "“", "”", "–", "—", "—", "–", ",", "<", ".", ">", "/", "?"); $clean = trim(str_replace($strip, "", strip_tags($string))); $clean = preg_replace('/\\s+/', "-", $clean); $clean = $anal ? preg_replace("/[^a-zA-Z0-9]/", "-", $clean) : $clean; return $force_lowercase ? function_exists('mb_strtolower') ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean; }
public function Modifica_Autorizaciones($t_id, $autorizador, $lugar) { $query = "SELECT t_ruta_autorizacion FROM tramites WHERE t_id = {$t_id}"; $rst = parent::consultar($query); $aux = explode("|", mysql_result($rst, 0, 't_ruta_autorizacion')); $t_autorizaciones = ""; for ($i = 0; $i < count($aux); $i++) { if ($lugar == 0) { if ($lugar == $i) { $t_autorizaciones .= $autorizador; break; } else { $t_autorizaciones .= $aux[$i]; } } else { if ($lugar == $i) { $t_autorizaciones .= "|" . $autorizador; break; } else { $t_autorizaciones .= "|" . $aux[$i]; } } } $t_autorizaciones = SUBSTR($t_autorizaciones, 0, 1) == "|" ? SUBSTR($t_autorizaciones, 1, STRLEN($t_autorizaciones)) : $t_autorizaciones; $query = "UPDATE tramites SET t_autorizaciones = '{$t_autorizaciones}', t_fecha_ultima_modificacion = NOW() WHERE t_id='{$t_id}'"; parent::insertar($query); }
$encabezado .= "&observa=" . tourl($observa) . "&"; // Validaci�n de la fecha de vencimiento para los prestamos if ($ordenar == 0 && $opcionMenu == 1 && $flds_PRES_ESTADO == 2) { $x = date("Y-m-d"); if ($fechaVencimiento > $x) { $encabezado .= "&fechaVencimiento=" . tourl($fechaVencimiento) . "&"; $enviar = 1; } else { echo "<script> alert('La fecha de vencimiento no puede ser menor o igual que la actual'); </script>"; $nover = 1; } } // Validaci�n de la contrase�a $flds_CONTRASENA = strip($_POST["s_CONTRASENA"]); if ($ordenar == 0 && $verClave == 1 && $nover != 1) { $query = "select USUA_CODI from USUARIO where USUA_LOGIN='******' and USUA_PASW='" . SUBSTR(md5($flds_CONTRASENA), 1, 26) . "'"; $rs = $db->conn->query($query); if ($rs && !$rs->EOF) { $enviar = 1; } else { echo "<script> alert('La contrase�a del usuario solicitante es incorrecta'); </script>"; $enviar = 0; } } } } if ($enviar == 1) { // Llama la p�gina que hace el procesamiento echo " .. "; echo "<form action='" . $ruta_raiz . "/solicitar/Reservar.php?<?={$encabezado}?>' method='post' name='go'> </form><br>"; echo "<script>document.go.submit();</script>";
function add_npc() { check_authorization(); global $mysql, $specialattacks; // Define checkbox fields: if ($_POST['qglobal'] != 1) { $_POST['qglobal'] = 0; } if ($_POST['npc_aggro'] != 1) { $_POST['npc_aggro'] = 0; } if ($_POST['findable'] != 1) { $_POST['findable'] = 0; } if ($_POST['trackable'] != 1) { $_POST['trackable'] = 0; } if ($_POST['private_corpse'] != 1) { $_POST['private_corpse'] = 0; } if ($_POST['unique_spawn_by_name'] != 1) { $_POST['unique_spawn_by_name'] = 0; } if ($_POST['underwater'] != 1) { $_POST['underwater'] = 0; } if ($_POST['isquest'] != 1) { $_POST['isquest'] = 0; } foreach ($specialattacks as $k => $v) { if (isset($_POST["{$k}"])) { if (SUBSTR($_POST["{$k}"], -1) != '^' && $_POST["{$k}"] != '') { $_POST["{$k}"] .= '^'; } $special_abilities .= $_POST["{$k}"]; } } $fields = "id=\"" . $_POST['id'] . "\", "; $fields .= "name=\"" . $_POST['name'] . "\", "; $fields .= "lastname=\"" . $_POST['lastname'] . "\", "; $fields .= "level=\"" . $_POST['level'] . "\", "; $fields .= "race=\"" . $_POST['race'] . "\", "; $fields .= "class=\"" . $_POST['class'] . "\", "; $fields .= "bodytype=\"" . $_POST['bodytype'] . "\", "; $fields .= "hp=\"" . $_POST['hp'] . "\", "; $fields .= "mana=\"" . $_POST['mana'] . "\", "; $fields .= "gender=\"" . $_POST['gender'] . "\", "; $fields .= "texture=\"" . $_POST['texture'] . "\", "; $fields .= "helmtexture=\"" . $_POST['helmtexture'] . "\", "; $fields .= "herosforgemodel=\"" . $_POST['herosforgemodel'] . "\", "; $fields .= "size=\"" . $_POST['size'] . "\", "; $fields .= "hp_regen_rate=\"" . $_POST['hp_regen_rate'] . "\", "; $fields .= "mana_regen_rate=\"" . $_POST['mana_regen_rate'] . "\", "; $fields .= "loottable_id=\"" . $_POST['loottable_id'] . "\", "; //merchant_id //alt_currency_id $fields .= "npc_spells_id=\"" . $_POST['npc_spells_id'] . "\", "; //npc_spells_effects_id //npc_faction_id //adventure_template_id //trap_template $fields .= "mindmg=\"" . $_POST['mindmg'] . "\", "; $fields .= "maxdmg=\"" . $_POST['maxdmg'] . "\", "; $fields .= "attack_count=\"" . $_POST['attack_count'] . "\", "; //npcspecialattks $fields .= "special_abilities=\"{$special_abilities}\", "; $fields .= "aggroradius=\"" . $_POST['aggroradius'] . "\", "; $fields .= "assistradius=\"" . $_POST['assistradius'] . "\", "; $fields .= "face=\"" . $_POST['face'] . "\", "; $fields .= "luclin_hairstyle=\"" . $_POST['luclin_hairstyle'] . "\", "; $fields .= "luclin_haircolor=\"" . $_POST['luclin_haircolor'] . "\", "; $fields .= "luclin_eyecolor=\"" . $_POST['luclin_eyecolor'] . "\", "; $fields .= "luclin_eyecolor2=\"" . $_POST['luclin_eyecolor2'] . "\", "; $fields .= "luclin_beardcolor=\"" . $_POST['luclin_beardcolor'] . "\", "; $fields .= "luclin_beard=\"" . $_POST['luclin_beard'] . "\", "; $fields .= "drakkin_heritage=\"" . $_POST['drakkin_heritage'] . "\", "; $fields .= "drakkin_tattoo=\"" . $_POST['drakkin_tattoo'] . "\", "; $fields .= "drakkin_details=\"" . $_POST['drakkin_details'] . "\", "; //armortint_id $fields .= "armortint_red=\"" . $_POST['armortint_red'] . "\", "; $fields .= "armortint_green=\"" . $_POST['armortint_green'] . "\", "; $fields .= "armortint_blue=\"" . $_POST['armortint_blue'] . "\", "; $fields .= "d_melee_texture1=\"" . $_POST['d_melee_texture1'] . "\", "; $fields .= "d_melee_texture2=\"" . $_POST['d_melee_texture2'] . "\", "; //ammo_idfile $fields .= "prim_melee_type=\"" . $_POST['prim_melee_type'] . "\", "; $fields .= "sec_melee_type=\"" . $_POST['sec_melee_type'] . "\", "; //ranged_type $fields .= "runspeed=\"" . $_POST['runspeed'] . "\", "; $fields .= "MR=\"" . $_POST['MR'] . "\", "; $fields .= "CR=\"" . $_POST['CR'] . "\", "; $fields .= "DR=\"" . $_POST['DR'] . "\", "; $fields .= "FR=\"" . $_POST['FR'] . "\", "; $fields .= "PR=\"" . $_POST['PR'] . "\", "; $fields .= "Corrup=\"" . $_POST['Corrup'] . "\", "; $fields .= "PhR=\"" . $_POST['PhR'] . "\", "; $fields .= "see_invis=\"" . $_POST['see_invis'] . "\", "; $fields .= "see_invis_undead=\"" . $_POST['see_invis_undead'] . "\", "; $fields .= "qglobal=\"" . $_POST['qglobal'] . "\", "; $fields .= "AC=\"" . $_POST['AC'] . "\", "; $fields .= "npc_aggro=\"" . $_POST['npc_aggro'] . "\", "; $fields .= "spawn_limit=\"" . $_POST['spawn_limit'] . "\", "; $fields .= "attack_speed=\"" . $_POST['attack_speed'] . "\", "; $fields .= "attack_delay=\"" . $_POST['attack_delay'] . "\", "; $fields .= "findable=\"" . $_POST['findable'] . "\", "; $fields .= "STR=\"" . $_POST['STR'] . "\", "; $fields .= "STA=\"" . $_POST['STA'] . "\", "; $fields .= "DEX=\"" . $_POST['DEX'] . "\", "; $fields .= "AGI=\"" . $_POST['AGI'] . "\", "; $fields .= "_INT=\"" . $_POST['_INT'] . "\", "; $fields .= "WIS=\"" . $_POST['WIS'] . "\", "; $fields .= "CHA=\"" . $_POST['CHA'] . "\", "; $fields .= "see_hide=\"" . $_POST['see_hide'] . "\", "; $fields .= "see_improved_hide=\"" . $_POST['see_improved_hide'] . "\", "; $fields .= "trackable=\"" . $_POST['trackable'] . "\", "; //isbot //exclude $fields .= "ATK=\"" . $_POST['ATK'] . "\", "; $fields .= "Accuracy=\"" . $_POST['Accuracy'] . "\", "; //Avoidance $fields .= "slow_mitigation=\"" . $_POST['slow_mitigation'] . "\", "; $fields .= "version=\"" . $_POST['version'] . "\", "; $fields .= "maxlevel=\"" . $_POST['maxlevel'] . "\", "; $fields .= "scalerate=\"" . $_POST['scalerate'] . "\", "; $fields .= "private_corpse=\"" . $_POST['private_corpse'] . "\", "; $fields .= "unique_spawn_by_name=\"" . $_POST['unique_spawn_by_name'] . "\", "; $fields .= "underwater=\"" . $_POST['underwater'] . "\", "; $fields .= "isquest=\"" . $_POST['isquest'] . "\", "; $fields .= "emoteid=\"" . $_POST['emoteid'] . "\", "; $fields .= "spellscale=\"" . $_POST['spellscale'] . "\", "; $fields .= "healscale=\"" . $_POST['healscale'] . "\", "; $fields .= "no_target_hotkey=\"" . $_POST['no_target_hotkey'] . "\", "; $fields .= "raid_target=\"" . $_POST['raid_target'] . "\", "; //armtexture //bracertexture //handtexture //legtexture //feettexture $fields .= "light=\"" . $_POST['light'] . "\""; //walkspeed //peqid //unique_ //fixed if ($fields != '') { $query = "INSERT INTO npc_types SET {$fields}"; $query2 = "UPDATE npc_types SET special_abilities = TRIM(TRAILING '^' FROM special_abilities)"; $mysql->query_no_result($query); $mysql->query_no_result($query2); } }
} $A['Q2'] = STR_REPLACE(array('+', '-', '=', ' '), '', $Q); if ($A['Q1'] != '=') { $A['Q3'] = 'quantity = quantity ' . $A['Q1'] . ' ?'; } else { $A['Q3'] = 'quantity = ?'; } $A['P1'] = SUBSTR($P, 0, 1); if (IS_NUMERIC($A['P1'])) { $A['P1'] = '='; } $A['P2'] = STR_REPLACE(array('+', '-', '=', ' '), '', $P); if ($A['P1'] != '=') { $A['P3'] = 'price = price ' . $A['P1'] . ' ?'; } else { $A['P3'] = 'price = ?'; } $A['M1'] = SUBSTR($M, 0, 1); if (IS_NUMERIC($A['M1'])) { $A['M1'] = '='; } $A['M2'] = STR_REPLACE(array('+', '-', '=', ' '), '', $M); if ($A['M1'] != '=') { $A['M3'] = 'minimum = minimum ' . $A['M1'] . ' ?'; } else { $A['M3'] = 'minimum = ?'; } $Q = 'INSERT INTO inventory_stock (store, item, quantity, minimum, price, modified) VALUES (?,?,?,?,?,?) ON DUPLICATE KEY UPDATE ' . $A['Q3'] . ', ' . $A['P3'] . ', ' . $A['M3']; MYSQL::QUERY($Q, array($user['store'], $PID, $A['Q2'], $A['M2'], $A['P2'], DATE('Y-m-d H:i:s'), $A['Q2'], $A['P2'], $A['M2'])); $CHECK = MYSQL::QUERY('SELECT quantity,minimum,price FROM inventory_stock WHERE store = ? AND item = ? LIMIT 1', array($user['store'], $PID)); echo $CHECK['quantity'] . '|' . $CHECK['price'] . '|' . $CHECK['minimum'];
function index($ContractNo, $SD, $ED) { if (empty($offset)) { $offset = 0; } //if (empty($order_column)) $ContractNo = 'Seq'; if (empty($order_type)) { $order_type = 'asc'; } $currentuser = $this->session->userdata('username'); $astartdate = $this->prtspotlogmodel->get_billingstartdate($currentuser); $aenddate = $this->prtspotlogmodel->get_billingenddate($currentuser); // load data $Users = $this->prtspotlogmodel->get_paged_list($ContractNo, $astartdate, $aenddate)->result(); //$Users2 = $this->prtspotlogmodel->get_spotnames($order_column); // generate pagination $this->load->library('pagination'); $config['base_url'] = site_url('/prtspotlog/index/'); //$config['total_rows'] = $this->prtspotlogmodel->count_all($ContractNo); //$config['per_page'] = $this->prtspotlogmodel->count_all($ContractNo); //$config['uri_segment'] = 3; $this->pagination->initialize($config); $data['pagination'] = $this->pagination->create_links(); // generate table data $this->load->library('table'); $this->table->set_empty(""); //$new_order = ($order_type == 'desc' ? 'desc' : 'asc'); $this->table->set_heading('Seq', 'Date', 'Weekday', 'Network', 'SysCode', 'Program Name', 'Air Time', 'Spot Name', 'Length', 'Price'); $TotalOrders = 0; $TotalPrice = 0; $c = 0; $i = 0 + $offset; foreach ($Users as $Users) { if (strpos($Users->siSp, ' ') == true) { $sn = "<font color='red'>" . "Check Spot Name!" . "</font>"; } else { $sn = $Users->siSp; } $this->table->add_row($Users->siS, date("M d, Y", strtotime($Users->siT)), date("l", strtotime($Users->siT)), $Users->siN, $this->prtspotlogmodel->get_syscode($Users->chS), $this->prtspotlogmodel->get_progname($Users->siN), SUBSTR($Users->siT, 11), $sn, $Users->siR, number_format($Users->siP, 2)); $c++; } $this->table->add_row("", "", "", "", "", "", "", "", "", ""); $this->table->add_row("Total Spots", "", $c, "", "", "", "", "", '', ""); //$data['totalprice'] = $TotalPrice; // $data['name'] =$Users->t3N; //$data['add1'] =$Users->t3A1; //$data['add2'] =$Users->t3A2; //$data['city'] =$Users->t3C; //$data['state'] =$Users->t3S; //$data['zip'] =$Users->t3Z; //$data['syscode'] =$Users->t4S; //$data['StartDate'] =$Users->t2SD; //$data['StartDate'] =$astartdate; //$data['EndDate'] =$Users->t2ED; //$data['EndDate'] =$aenddate; //$data['cn'] =$Users->t2CN; //$data['co'] =$Users->t2CO; // $data['contractno'] =$order_column; $data['name'] = $this->prtspotlogmodel->get_customer($ContractNo); //$data['syscode'] =$this->prtspotlogmodel->get_systemcode($ContractNo); //$data['StartDate'] =$Users->t2SD; $data['StartDate'] = $astartdate; //$data['EndDate'] =$Users->t2ED; $data['EndDate'] = $aenddate; //$data['sd'] =$this->prtspotlogmodel->get_sd($ContractNo); $data['sd'] = $astartdate; //$data['ed'] =$this->prtspotlogmodel->get_ed($ContractNo); $data['ed'] = $aenddate; $data['cc'] = $ContractNo; $data['cn'] = $this->prtspotlogmodel->get_contractname($ContractNo); $data['co'] = $this->prtspotlogmodel->get_custorder($ContractNo); $data['spotname'] = substr($this->prtspotlogmodel->get_spotnames($ContractNo), 1, 32); $data['table'] = $this->table->generate(); // load view $data['Role'] = $this->session->userdata('role'); $this->load->view('pages/template/spotlog_header'); $this->load->view('pages/prtspotlog_view', $data); }
$tip3img[$dirTipo][$numTp] = $imgTip3; //echo "<hr> $ tip3img[$dirTipo][$numTp] =". $tip3img[$dirTipo][$numTp] ."<hr>"; } } $rs->MoveNext(); } if ($recOrfeo == "Seguridad") { $queryRec = "AND USUA_SESION='" . str_replace(".", "o", $REMOTE_ADDR) . "o{$krd}' "; } else { //Consulta rapida para saber si el usuario se autentica por LDAP o por DB $myQuery = "SELECT USUA_AUTH_LDAP from usuario where USUA_LOGIN ='******'"; $db->conn->SetFetchMode(ADODB_FETCH_ASSOC); $rs = $db->query($myQuery); $autenticaPorLDAP = $rs->fields['USUA_AUTH_LDAP']; if ($autenticaPorLDAP == 0) { $queryRec = "AND (USUA_PASW ='" . SUBSTR(md5($drd), 1, 26) . "' or USUA_NUEVO=0)"; //echo "CLAVE: " . SUBSTR(md5($drd),1,26); } else { $queryRec = ''; } } //Analiza la opcion de que se trate de un requerimieento de sesión desde una máquina segura if ($REMOTE_ADDR == $host_log_seguro) { $REMOTE_ADDR = $ipseguro; $queryRec = ""; $swSessSegura = 1; } $query = "SELECT a.*,\n\t\t\t\tb.DEPE_NOMB,\n\t\t\t\ta.USUA_ESTA,\n\t\t\t\ta.USUA_CODI,\n\t\t\t\ta.USUA_LOGIN,\n\t\t\t\tb.DEPE_CODI_TERRITORIAL,\n\t\t\t\tb.DEPE_CODI_PADRE,\n\t\t\t\ta.USUA_PERM_ENVIOS,\n\t\t\t\ta.USUA_PERM_MODIFICA,\n\t\t\t\ta.USUA_PERM_EXPEDIENTE,\n\t\t\t\ta.USUA_EMAIL,\n\t\t\t\ta.USUA_AUTH_LDAP\n\t\t\t\t{$queryTRad}\n\t\t\t\t{$queryDepeRad}\n\t\t\tFROM USUARIO a,\n\t\t\t\tDEPENDENCIA b\n\t\t\tWHERE USUA_LOGIN ='******' AND \n\t\t\t\ta.depe_codi=b.depe_codi\n\t\t\t\t{$queryRec}"; /** Procedimiento forech que encuentra los numeros de secuencia para las radiciones * @param tpDepeRad[] array Muestra las dependencias que contienen las secuencias para radicion. */
$tip3Nombre[$dirTipo][$numTp] = $nombTip3; $tip3desc[$dirTipo][$numTp] = $descTip3; $tip3img[$dirTipo][$numTp] = $imgTip3; } } $rs->MoveNext(); } if ($recOrfeo == "Seguridad") { $queryRec = "AND USUA_SESION='" . date("amdhIs") . "o" . str_replace(".", "", $REMOTE_ADDR) . "{$krd}' "; } else { //Consulta rapida para saber si el usuario se autentica por LDAP o por DB $myQuery = "SELECT USUA_AUTH_LDAP from usuario where USUA_LOGIN ='******'"; $db->conn->SetFetchMode(ADODB_FETCH_ASSOC); $rs = $db->query($myQuery); $autenticaPorLDAP = $rs->fields['USUA_AUTH_LDAP']; $queryRec = ($autenticaPorLDAP == 0 or !$autenticaPorLDAP) ? "AND (USUA_PASW ='" . SUBSTR(md5($drd), 1, 26) . "' or USUA_NUEVO='0')" : ''; } //Analiza la opcion de que se trate de un requerimieento de sesion desde una máquina segura if ($_SERVER["REMOTE_ADDR"] == $host_log_seguro) { //print ("ENTRA ... ($REMOTE_ADDR==$host_log_seguro) "); $REMOTE_ADDR = $ipseguro; $queryRec = ""; $swSessSegura = 1; } //Modificado idrd para tomar los valores de permisos de empresas y parques //No añadir parques que ya esta incluido en el a.* jlosada $query = "select a.*, \r\n\t\t\tb.DEPE_NOMB,\r\n\t\t\ta.USUA_ESTA,\r\n\t\t\ta.USUA_CODI,\r\n\t\t\ta.USUA_LOGIN,\r\n\t\t\tb.DEPE_CODI_TERRITORIAL,\r\n\t\t\tb.DEPE_CODI_PADRE,\r\n\t\t\ta.USUA_PERM_ENVIOS,\r\n\t\t\ta.USUA_PERM_MODIFICA,\r\n\t\t\ta.USUA_PERM_EXPEDIENTE,\r\n\t\t\ta.USUA_EMAIL,\r\n\t\t\ta.USUA_AUTH_LDAP\r\n\t\t\t{$queryTRad}\r\n\t\t\t{$queryDepeRad}\r\n\t\tfrom usuario a, DEPENDENCIA b\r\n\t\twhere USUA_LOGIN ='******' and a.depe_codi=b.depe_codi {$queryRec}"; /** Procedimiento forech que encuentra los numeros de secuencia para las radiciones * @param tpDepeRad[] array Muestra las dependencias que contienen las secuencias para radicion. */ $varQuery = $query;
function Spider_Video_Player_front_end($id) { ob_start(); global $ident; global $wpdb; $find_priority = $wpdb->get_row($wpdb->prepare("SELECT priority FROM " . $wpdb->prefix . "Spider_Video_Player_player WHERE id=%d", $id)); $priority = $find_priority->priority; ?> <div id="spidervideoplayerhtml5_<?php echo $ident; ?> " style="display:none"> <?php if ($priority == 1 || $priority == 0) { $theme_id = $wpdb->get_row($wpdb->prepare("SELECT theme FROM " . $wpdb->prefix . "Spider_Video_Player_player WHERE id=%d", $id)); $playlist = $wpdb->get_row($wpdb->prepare("SELECT playlist FROM " . $wpdb->prefix . "Spider_Video_Player_player WHERE id=%d", $id)); $playlist_array = explode(',', $playlist->playlist); global $many_players; if (isset($_POST['playlist_id'])) { $playlistID = esc_html(stripslashes($_POST['playlist_id'])); } else { $playlistID = 1; } $key = $playlistID - 1; if (isset($playlist->playlist)) { $playlistID = count($playlist_array) - 1; } else { $playlistID = 1; } $key = $playlistID - 1; $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_playlist WHERE id=%d", $playlist_array[0])); $theme = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_theme WHERE id=%d", $theme_id->theme)); $row1 = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_player WHERE id=%d", $id)); $themeid = $row1->theme; if (isset($row->videos)) { $video_ids = substr($row->videos, 0, -1); } else { $video_ids = 0; } $videos = $wpdb->get_results("SELECT url,urlHtml5,type,title,thumb FROM " . $wpdb->prefix . "Spider_Video_Player_video WHERE id IN ({$video_ids})"); $video_urls = ''; for ($i = 0; $i < count($videos); $i++) { if ($videos[$i]->urlHtml5 != "") { $video_urls .= "'" . $videos[$i]->urlHtml5 . "'" . ','; } else { $video_urls .= "'" . $videos[$i]->url . "'" . ','; } } $video_urls = substr($video_urls, 0, -1); $playlists = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_playlist"); $libRows = $theme->libRows; $libCols = $theme->libCols; $cellWidth = 100 / $libCols . '%'; $cellHeight = 100 / $libRows . '%'; $play = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_playlist"); // load the row from the db table $k = $libRows * $libCols; if (isset($_POST['play'])) { $p = esc_html(stripslashes($_POST['play'])); } else { $p = 0; } $display = 'style="width:100%;height:100% !important;border-collapse: collapse;"'; $table_count = 1; $itemBgHoverColor = '#' . $theme->itemBgHoverColor; $vds = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_video"); $ctrlsStack = $theme->ctrlsStack; if ($theme->ctrlsPos == 2) { $ctrl_top = $theme->appHeight - 35 . 'px'; $share_top = '-140px'; } else { $ctrl_top = '5px'; $share_top = '-' . $theme->appHeight + 20 . 'px'; } if (isset($_POST['AlbumId'])) { $AlbumId = esc_html(stripslashes($_POST['AlbumId'])); } else { $AlbumId = ''; } if (isset($_POST['TrackId'])) { $TrackId = esc_html(stripslashes($_POST['TrackId'])); } else { $TrackId = ''; } ?> <style> a#dorado_mark_<?php echo $ident; ?> :hover { background: none !important; } #album_table_<?php echo $ident; ?> td, #album_table_<?php echo $ident; ?> tr, #album_table_<?php echo $ident; ?> img { line-height: 1em !important; } #share_buttons_<?php echo $ident; ?> img { display: inline !important; } #album_div_<?php echo $ident; ?> table { margin: 0px !important; } #album_table_<?php echo $ident; ?> { margin: -1 0 1.625em !important; } table { margin: 0em; } #global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> { position: absolute; background-color: rgba(<?php echo HEXDEC(SUBSTR($theme->framesBgColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->framesBgColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->framesBgColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> ); top: <?php echo $ctrl_top; ?> !important; width: <?php echo $theme->appWidth; ?> px; height: 40px; z-index: 7; margin-top: -5px; } #global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> td { padding: 0px !important; margin: 0px !important; } #global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> td img { padding: 0px !important; margin: 0px !important; } #global_body_<?php echo $ident; ?> .progressBar_<?php echo $ident; ?> { position: relative; width: 100%; height: 6px; z-index: 5; cursor: pointer; border-top: 1px solid rgba(<?php echo HEXDEC(SUBSTR($theme->slideColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->slideColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->slideColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> ); border-bottom: 1px solid rgba(<?php echo HEXDEC(SUBSTR($theme->slideColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->slideColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->slideColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> ); } #global_body_<?php echo $ident; ?> .timeBar_<?php echo $ident; ?> { position: absolute; top: 0; left: 0; width: 0; height: 100%; background-color: <?php echo '#' . $theme->slideColor; ?> ; z-index: 5; } #global_body_<?php echo $ident; ?> .bufferBar_<?php echo $ident; ?> { position: absolute; top: 0; left: 0; width: 0; height: 100%; background-color: <?php echo '#' . $theme->slideColor; ?> ; opacity: 0.3; } #global_body_<?php echo $ident; ?> .volumeBar_<?php echo $ident; ?> { position: relative; overflow: hidden; width: 0px; height: 4px; background-color: rgba(<?php echo HEXDEC(SUBSTR($theme->framesBgColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->framesBgColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->framesBgColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> ); border: 1px solid rgba(<?php echo HEXDEC(SUBSTR($theme->slideColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->slideColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->slideColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> ); } #global_body_<?php echo $ident; ?> img { background: none !important; } #global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> { position: absolute; top: 0; left: 0; width: 0; height: 100%; background-color: <?php echo '#' . $theme->slideColor; ?> ; } #play_list_<?php echo $ident; ?> { height: <?php echo $theme->appHeight; ?> px; width: 0px; <?php if ($theme->playlistPos == 1) { echo 'position:absolute;float:left !important;'; } else { echo 'position:absolute;float:right !important;right:0;'; } ?> ; background-color: rgba(<?php echo HEXDEC(SUBSTR($theme->framesBgColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->framesBgColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->framesBgColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> ) !important; color: white; z-index: 100; padding: 0px !important; margin: 0px !important; } #play_list_<?php echo $ident; ?> img, #play_list_<?php echo $ident; ?> td { background-color: transparent !important; color: white; padding: 0px !important; margin: 0px !important; } .control_btns_<?php echo $ident; ?> { opacity: <?php echo $theme->ctrlsMainAlpha / 100; ?> ; } #control_btns_<?php echo $ident; ?> , #volumeTD_<?php echo $ident; ?> { margin: 0px; } img { box-shadow: none !important; } #td_ik_<?php echo $ident; ?> { border: 0px; } </style> <?php $player_id = $wpdb->get_var($wpdb->prepare("SELECT theme FROM " . $wpdb->prefix . "Spider_Video_Player_player WHERE id=%d", $id)); ?> <div id="global_body_<?php echo $ident; ?> " style="width:<?php echo $theme->appWidth; ?> px;height:<?php echo $theme->appHeight; ?> px; position:relative;"> <?php $row1 = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_theme WHERE id=%d", $player_id)); $start_lib = $row1->startWithLib; ?> <div id="video_div_<?php echo $ident; ?> " style="display:<?php if ($start_lib == 1) { echo 'none'; } else { echo 'block'; } ?> ;width:<?php echo $theme->appWidth; ?> px;height:<?php echo $theme->appHeight; ?> px;background-color:<?php echo "#" . $theme->vidBgColor; ?> "> <div id="play_list_<?php echo $ident; ?> "> <input type='hidden' value='0' id="track_list_<?php echo $ident; ?> "/> <div style="height:90%" id="play_list1_<?php echo $ident; ?> "> <div id="arrow_up_<?php echo $ident; ?> " onmousedown="scrolltp2=setInterval('scrollTop2_<?php echo $ident; ?> ()', 30)" onmouseup="clearInterval(scrolltp2)" onclick="scrollTop2_<?php echo $ident; ?> ()" style="overflow:hidden; text-align:center;width:<?php echo $theme->playlistWidth; ?> px; height:20px"> <img src="<?php echo plugins_url('', __FILE__); ?> /images/top.png" style="cursor:pointer; border:none;" id="button20_<?php echo $ident; ?> "/> </div> <div style="height:<?php echo $theme->appHeight - 40; ?> px;overflow:hidden;" id="video_list_<?php echo $ident; ?> "> <?php //echo '<p onclick="document.getElementById("videoID").src="'.$videos[$i]["url"].'" ">'.$videos[$i]['title'].'</p>'; for ($i = 0; $i < count($playlist_array) - 1; $i++) { $playy = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_playlist WHERE id=%d", $playlist_array[$i])); $v_ids = explode(',', $playy->videos); $vi_ids = substr($playy->videos, 0, -1); if ($i != 0) { echo '<table id="track_list_' . $ident . '_' . $i . '" width="100%" style="display:none;height:100%;border-spacing:0px;border:none;border-collapse: inherit;padding:0px !important;background: transparent !important;" >'; } else { echo '<table id="track_list_' . $ident . '_' . $i . '" width="100%" style="display:block;height:100%; border-spacing:0px;border:none;border-collapse: inherit;padding:0px !important;background: transparent !important;" > '; } echo '<tr style="background:transparent "> <td id="td_ik_' . $ident . '" style="text-align:left;border:0px solid grey;width:100%;vertical-align:top;"> <div id="scroll_div2_' . $i . '_' . $ident . '" class="playlist_values_' . $ident . '" style="position:relative">'; $jj = 0; $vtttt = ''; for ($j = 0; $j < count($v_ids) - 1; $j++) { $vdss = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_video WHERE id=%d", $v_ids[$j])); if ($vdss->type == "http" || $vdss->type == "youtube" || $vdss->type == "vimeo") { if (($vdss->urlHtml5 == "" || !strpos($vdss->url, 'embed')) && $vdss->type != "vimeo") { if ($vdss->type == "youtube") { $html5Url = "https://www.youtube.com/embed/" . substr($vdss->url, strpos($vdss->url, '?v=') + 3, 11) . "?enablejsapi=1&html5=1&controls=1&modestbranding=1&rel=0"; } else { $html5Url = $vdss->url; } } else { $html5Url = $vdss->urlHtml5; } $vidsTHUMB = $vdss->thumb; $vtttt = !$j || $j && !$vtttt ? $vidsTHUMB : $vtttt; if ($vdss->urlHDHtml5 != "") { $html5UrlHD = $vdss->urlHDHtml5; } else { $html5UrlHD = $vdss->urlHD; } echo '<div id="thumb_' . $jj . '_' . $ident . '" onclick="jQuery(\'#HD_on_' . $ident . '\').val(0);'; if ($vdss->type == "youtube") { echo 'youtube_control_' . $ident . '(\'' . $html5Url . '\'); '; } elseif ($vdss->type == "vimeo") { echo 'vimeo_control_' . $ident . '(\'' . $html5Url . '\'); '; } else { echo ' document.getElementById(\'videoID_' . $ident . '\').src=\'' . $html5Url . '\';video_control_' . $ident . '(\'' . $html5Url . '\');play_' . $ident . '();'; } echo 'document.getElementById(\'videoID_' . $ident . '\').poster=\'' . $vidsTHUMB . '\';vid_select_' . $ident . '(this);vid_num=' . $jj . ';jQuery(\'#current_track_' . $ident . '\').val(' . $jj . ');" class="vid_thumb_' . $ident . '" style="color:#' . $theme->textColor . ';cursor:pointer;width:' . $theme->playlistWidth . 'px;text-align:center; " >'; if ($vdss->thumb) { echo '<img src="' . $vidsTHUMB . '" width="90px" style="display:none; border:none;" />'; } echo '<p style="font-size:' . $theme->playlistTextSize . 'px !important;line-height:30px !important;cursor:pointer;margin: 0px !important;padding:0px !important" >' . ($theme->show_trackid ? $jj + 1 . '-' : '') . $vdss->title . '</p></div>'; echo '<input type="hidden" id="urlHD_' . $jj . '_' . $ident . '" value="' . $html5UrlHD . '" />'; echo '<input type="hidden" id="vid_type_' . $jj . '_' . $ident . '" value="' . $vdss->type . '" />'; $jj = $jj + 1; } } echo '</div></td> </tr></table>'; } ?> </div> <div onmousedown="scrollBot2=setInterval('scrollBottom2_<?php echo $ident; ?> ()', 30)" onmouseup="clearInterval(scrollBot2)" onclick="scrollBottom2_<?php echo $ident; ?> ()" style="position:absolute;overflow:hidden; text-align:center;width:<?php echo $theme->playlistWidth; ?> px; height:20px" id="divulushka_<?php echo $ident; ?> "><img src="<?php echo plugins_url('', __FILE__); ?> /images/bot.png" style="cursor:pointer; border:none;" id="button21_<?php echo $ident; ?> "/></div> </div> </div> <video ontimeupdate="timeUpdate_<?php echo $ident; ?> ()" ondurationchange="durationChange_<?php echo $ident; ?> ();" id="videoID_<?php echo $ident; ?> " src="" poster="<?php echo $vtttt; ?> " style="width:100%; height:100%;margin:0px;position: absolute;"> <p>Your browser does not support the video tag.</p> </video> <img src="<?php echo plugins_url('', __FILE__); ?> /images/wd_logo.png" style="bottom: 30px;position: absolute;width: 140px;height: 73px; border: 0px !important;left: 0px;"/> <div class="control_<?php echo $ident; ?> " id="control_<?php echo $ident; ?> " style="overflow:hidden;"> <?php if ($theme->ctrlsPos == 2) { ?> <div class="progressBar_<?php echo $ident; ?> "> <div class="timeBar_<?php echo $ident; ?> "></div> <div class="bufferBar_<?php echo $ident; ?> "></div> </div> <?php } $ctrls = explode(',', $ctrlsStack); $y = 1; echo '<table id="control_btns_' . $ident . '" style="width: 100%; border:none;border-collapse: inherit; background: transparent;padding: 0px !important;"><tr style="background: transparent;">'; for ($i = 0; $i < count($ctrls); $i++) { $ctrl = explode(':', $ctrls[$i]); if ($ctrl[1] == 1) { echo '<td style="border:none;background: transparent;">'; if ($ctrl[0] == 'playPause') { if ($theme->appWidth > 400) { echo '<img id="button' . $y . '_' . $ident . '" class="btnPlay" width="16" style="position: relative;vertical-align: middle;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . '; height:19px" src="' . plugins_url('', __FILE__) . '/images/play.png" />'; echo '<img id="button' . ($y + 1) . '_' . $ident . '" width="16" class="btnPause" style="position: relative;vertical-align: middle;display:none;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';height:18px" src="' . plugins_url('', __FILE__) . '/images/pause.png" />'; } else { echo '<img id="button' . $y . '_' . $ident . '" class="btnPlay" style="vertical-align: middle;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/play.png" />'; echo '<img id="button' . ($y + 1) . '_' . $ident . '" width="16" class="btnPause" style="vertical-align: middle;height: 18px !important;display:none;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/pause.png" />'; } $y = $y + 2; } else { if ($ctrl[0] == '+') { echo '<span id="space" style="position: relative;vertical-align: middle;padding-left:' . $theme->appWidth * 20 / 100 . 'px"></span>'; } else { if ($ctrl[0] == 'time') { echo ' <span style="color:#' . $theme->ctrlsMainColor . ';opacity:' . $theme->ctrlsMainAlpha / 100 . '; position:relative; vertical-align: middle; " id="time_' . $ident . '">00:00</span> <span style="color:#' . $theme->ctrlsMainColor . '; opacity:' . $theme->ctrlsMainAlpha / 100 . ';position:relative; vertical-align: middle;">/</span> <span style="color:#' . $theme->ctrlsMainColor . ';opacity:' . $theme->ctrlsMainAlpha / 100 . ';position:relative; vertical-align: middle;" id="duration_' . $ident . '">00:00</span>'; } else { if ($ctrl[0] == 'vol') { if ($theme->appWidth > 400) { $img_button = '<img style="position: relative;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';vertical-align: middle;" id="button' . $y . '_' . $ident . '" src="' . plugins_url('', __FILE__) . '/images/vol.png" />'; } else { $img_button = '<img style="vertical-align: middle;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" id="button' . $y . '_' . $ident . '" src="' . plugins_url('', __FILE__) . '/images/vol.png" />'; } echo '<table id="volumeTD_' . $ident . '" style="border:none;border-collapse: inherit; min-width: 0;background: transparent;padding: 0px !important;" > <tr style="background: transparent;"> <td id="voulume_img_' . $ident . '" style="top:5px;border:none;min-width:13px; background: transparent; width:20px;" >' . $img_button . ' </td> <td id="volumeTD2_' . $ident . '" style="width:0px; border:none; position:relative;background: transparent; "> <span id="volumebar_player_' . $ident . '" class="volumeBar_' . $ident . '" style="vertical-align: middle;"> <span class="volume_' . $ident . '" style="vertical-align: middle;"></span> </span> </td> </tr> </table> '; $y = $y + 1; } else { if ($ctrl[0] == 'shuffle') { if ($theme->appWidth > 400) { echo '<img id="button' . $y . '_' . $ident . '" class="shuffle_' . $ident . '" style="position: relative;vertical-align: middle;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/shuffle.png" />'; echo '<img id="button' . ($y + 1) . '_' . $ident . '" class="shuffle_' . $ident . '" style="position: relative;vertical-align: middle;display:none;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/shuffleoff.png" />'; } else { echo '<img id="button' . $y . '_' . $ident . '" class="shuffle_' . $ident . '" style="vertical-align: middle;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/shuffle.png" />'; echo '<img id="button' . ($y + 1) . '_' . $ident . '" class="shuffle_' . $ident . '" style="vertical-align: middle;display:none;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/shuffleoff.png" />'; } $y = $y + 2; } else { if ($ctrl[0] == 'repeat') { if ($theme->appWidth > 400) { echo ' <img id="button' . $y . '_' . $ident . '" class="repeat_' . $ident . '" style="position: relative;vertical-align: middle;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/repeat.png"/> <img id="button' . ($y + 1) . '_' . $ident . '" class="repeat_' . $ident . '" style="position: relative;vertical-align: middle;display:none;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/repeatOff.png"/> <img id="button' . ($y + 2) . '_' . $ident . '" class="repeat_' . $ident . '" style="osition: relative;vertical-align: middle;display:none;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/repeatOne.png"/> '; } else { echo ' <img id="button' . $y . '_' . $ident . '" class="repeat_' . $ident . '" style="vertical-align: middle;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/repeat.png"/> <img id="button' . ($y + 1) . '_' . $ident . '" class="repeat_' . $ident . '" style="vertical-align: middle;display:none;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/repeatOff.png"/> <img id="button' . ($y + 2) . '_' . $ident . '" class="repeat_' . $ident . '" style="vertical-align: middle;display:none;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" src="' . plugins_url('', __FILE__) . '/images/repeatOne.png"/> '; } $y = $y + 3; } else { if ($theme->appWidth > 400) { echo '<img style="position: relative;vertical-align: middle;cursor:pointer; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" id="button' . $y . '_' . $ident . '" class="' . $ctrl[0] . '_' . $ident . '" src="' . plugins_url('', __FILE__) . '/images/' . $ctrl[0] . '.png" />'; } else { echo '<img style="vertical-align: middle;cursor:pointer;max-width:7px; border:none;opacity:' . $theme->ctrlsMainAlpha / 100 . ';" id="button' . $y . '_' . $ident . '" class="' . $ctrl[0] . '_' . $ident . '" src="' . plugins_url('', __FILE__) . '/images/' . $ctrl[0] . '.png" />'; } $y = $y + 1; #echo "<script>jQuery(document).ready(show_hide_playlist);</script>"; } } } } } } echo '</td>'; } } echo '</tr></table>'; if ($theme->ctrlsPos == 1) { ?> <div class="progressBar_<?php echo $ident; ?> "> <div class="timeBar_<?php echo $ident; ?> "></div> <div class="bufferBar_<?php echo $ident; ?> "></div> </div> <?php } ?> </div> </div> <div id="album_div_<?php echo $ident; ?> " style="display:<?php if ($start_lib == 0) { echo 'none'; } ?> ;background-color:<?php echo "#" . $theme->appBgColor; ?> ;overflow:hidden;position:relative;height:<?php echo $theme->appHeight; ?> px;"> <table width="100%" height="100%" style="padding:0px !important;border:none;border-collapse: inherit;width: 100% !important;" id="album_table_<?php echo $ident; ?> "> <tr id="tracklist_up_<?php echo $ident; ?> " style="display:none; background: transparent;"> <td height="12px" colspan="2" style="text-align:right; border:none;background: transparent;padding: 0px !important;"> <div onmouseover="this.style.background='rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)); ?> ,0.4)'" onmouseout="this.style.background='none'" id="scroll" style="overflow:hidden;width:50%;height:100%;text-align:center;float:right;cursor:pointer;" onmousedown="scrolltp=setInterval('scrollTop_<?php echo $ident; ?> ()', 30)" onmouseup="clearInterval(scrolltp)" onclick="scrollTop_<?php echo $ident; ?> ()"> <img src="<?php echo plugins_url('', __FILE__); ?> /images/top.png" style="cursor:pointer; margin: 0px !important; padding: 0px !important; border:none;background: transparent;" id="button25_<?php echo $ident; ?> "/> <div> </td> </tr> <tr style="background: transparent;"> <td style="vertical-align:middle; border:none;background: transparent;padding: 0px !important;width: 4% !important; "> <img src="<?php echo plugins_url('', __FILE__); ?> /images/prev.png" style="cursor:pointer; margin: 0px !important; padding: 0px !important; background: transparent;border:none;min-width: 16px;" id="button28_<?php echo $ident; ?> " onclick="prevPage_<?php echo $ident; ?> ();"/> </td> <td style="border:none;background: transparent;padding: 2px !important;width:92% !important;" id="lib_td_<?php echo $ident; ?> "> <?php for ($l = 0; $l < $table_count; $l++) { echo '<table class="lib_tbl_' . $ident . '" id="lib_table_' . $l . '_' . $ident . '" ' . $display . '> '; for ($i = 0; $i < $libRows; $i++) { echo '<tr style="background: transparent;">'; for ($j = 0; $j < $libCols; $j++) { if ($p < count($playlist_array) - 1) { $playyy = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_playlist WHERE id=" . $playlist_array[$p]); $playTHUMB = $playyy->thumb; if ($playTHUMB != "") { $image_nk = '<img src="' . $playTHUMB . '" style="border:none; width:50% !important;background: transparent;"/>'; } else { $image_nk = ""; } echo '<td class="playlist_td_' . $ident . '" id="playlist_' . $p . '_' . $ident . '" onclick="openPlaylist_' . $ident . '(' . $p . ',' . $l . ')" onmouseover="this.style.color=\'#' . $theme->textHoverColor . '\';this.style.background=\'rgba(' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)) . ',0.4)\'" onmouseout="this.style.color=\'#' . $theme->textColor . '\';this.style.background=\' none\'" onclick="" style="color:#' . $theme->textColor . ';border:1px solid white;background: transparent;vertical-align:center; text-align:center;width:' . $cellWidth . ';height:' . $cellHeight . ';cursor:pointer;padding:5px !important; ">' . $image_nk . ' <p style="font-size:' . $theme->libListTextSize . 'px !important;margin-bottom: 0px !important;padding:0px !important;">' . $playyy->title . '</p> </td>'; $p = $p + 1; } else { echo '<td style="border:1px solid white;vertical-align:top;background: transparent; align:center;width:' . $cellWidth . ';height:' . $cellHeight . '"> </td>'; } } echo '</tr>'; } if ($p < count($playlist_array) - 1) { $table_count = $table_count + 1; $display = 'style="display:none;width:100%;height:100%;border-collapse: collapse;"'; } echo '</table>'; } for ($i = 0; $i < $p; $i++) { $play1 = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_playlist WHERE id=" . $playlist_array[$i]); $v_ids = explode(',', $play1->videos); $vi_ids = substr($play1->videos, 0, -1); $playTHUMB = $play1->thumb; if ($playTHUMB != "") { $image_nkar = '<img src="' . $playTHUMB . '" style="border:none;width:70% !important" /><br /><br />'; } else { $image_nkar = ""; } echo '<table playlist_id="' . $i . '" id="playlist_table_' . $i . '_' . $ident . '" style="border:none;border-collapse: inherit;display:none;height:100%;width:100% !important; padding:0px !important;" > </tr> <tr style="background: transparent;"> <td style="text-align:center;vertical-align:top;background: transparent;border:none;background: transparent;padding:5px !important;">'; echo $image_nkar; echo '<p style="color:#' . $theme->textColor . '; font-size:' . $theme->libDetailsTextSize . 'px !important;margin-bottom: 0px !important;">' . $play1->title . '</p>'; echo '</td> <td style="width:50% !important;border:none; background: transparent;padding: 5px !important;"> <div style="width:100%;text-align:left;border:1px solid white;height:' . ($theme->appHeight - 55) . 'px;vertical-align:top;position:relative;overflow:hidden; min-width: 130px;"> <div id="scroll_div_' . $i . '_' . $ident . '" style="position:relative;">'; $jj = 0; for ($j = 0; $j < count($v_ids) - 1; $j++) { $vds1 = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_video WHERE id=" . $v_ids[$j]); if ($vds1[0]->type == 'http') { echo '<p class="vid_title_' . $ident . '" ondblclick="jQuery(\'.show_vid_' . $ident . '\').click()" onmouseover="this.style.color=\'#' . $theme->textHoverColor . '\';this.style.background=\'rgba(' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)) . ',0.4)\'" onmouseout="this.style.color=\'#' . $theme->textColor . '\';this.style.background=\' none\'" style="padding: 0px !important;color:#' . $theme->textColor . ' !important;font-size:' . $theme->libDetailsTextSize . 'px !important;line-height:30px !important;cursor:pointer; margin: 0px !important;" onclick="jQuery(\'#HD_on_' . $ident . '\').val(0);jQuery(\'#track_list_' . $ident . '_' . $i . '\').find(\'.vid_thumb_' . $ident . '\')[' . $jj . '].click();playBTN_' . $ident . '();current_playlist_videos_' . $ident . '();vid_num=' . $jj . ';jQuery(\'#current_track_' . $ident . '\').val(' . $jj . ');vid_select2_' . $ident . '(this);playlist_select_' . $ident . '(' . $i . ') ">' . ($jj + 1) . ' - ' . $vds1[0]->title . '</p>'; $jj = $jj + 1; } elseif ($vds1[0]->type == 'youtube') { echo '<p class="vid_title_' . $ident . '" ondblclick="jQuery(\'.show_vid_' . $ident . '\').click()" onmouseover="this.style.color=\'#' . $theme->textHoverColor . '\';this.style.background=\'rgba(' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)) . ',0.4)\'" onmouseout="this.style.color=\'#' . $theme->textColor . '\';this.style.background=\' none\'" style="padding: 0px !important;color:#' . $theme->textColor . ' !important;font-size:' . $theme->libDetailsTextSize . 'px !important;line-height:30px !important;cursor:pointer; margin: 0px !important;" onclick="jQuery(\'#HD_on_' . $ident . '\').val(0);jQuery(\'#track_list_' . $ident . '_' . $i . '\').find(\'.vid_thumb_' . $ident . '\')[' . $jj . '].click();playBTN_' . $ident . '();current_playlist_videos_' . $ident . '();vid_num=' . $jj . ';jQuery(\'#current_track_' . $ident . '\').val(' . $jj . ');vid_select2_' . $ident . '(this);playlist_select_' . $ident . '(' . $i . ') ">' . ($jj + 1) . ' - ' . $vds1[0]->title . '</p>'; $jj = $jj + 1; } elseif ($vds1[0]->type == 'vimeo') { echo '<p class="vid_title_' . $ident . '" ondblclick="jQuery(\'.show_vid_' . $ident . '\').click()" onmouseover="this.style.color=\'#' . $theme->textHoverColor . '\';this.style.background=\'rgba(' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)) . ',' . HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)) . ',0.4)\'" onmouseout="this.style.color=\'#' . $theme->textColor . '\';this.style.background=\' none\'" style="padding: 0px !important;color:#' . $theme->textColor . ' !important;font-size:' . $theme->libDetailsTextSize . 'px !important;line-height:30px !important;cursor:pointer; margin: 0px !important;" onclick="jQuery(\'#HD_on_' . $ident . '\').val(0);jQuery(\'#track_list_' . $ident . '_' . $i . '\').find(\'.vid_thumb_' . $ident . '\')[' . $jj . '].click();playBTN_' . $ident . '();current_playlist_videos_' . $ident . '();vid_num=' . $jj . ';jQuery(\'#current_track_' . $ident . '\').val(' . $jj . ');vid_select2_' . $ident . '(this);playlist_select_' . $ident . '(' . $i . ') ">' . ($jj + 1) . ' - ' . $vds1[0]->title . '</p>'; $jj = $jj + 1; } } echo '</div></div> </td> </tr> </table>'; } ?> </td> <td style="vertical-align:bottom; border:none;background: transparent; position: relative;width: 5% !important;padding: 0px !important;max-width: 20px !important;"> <table style='height:<?php echo $theme->appHeight - 46; ?> px; border:none;border-collapse: inherit;'> <tr style="background: transparent;"> <td height='100%' style="border:none;background: transparent; vertical-align: middle;padding: 0px !important;"> <img src="<?php echo plugins_url('', __FILE__); ?> /images/next.png" style="cursor:pointer;border:none;background: transparent;display:inline !important; " id="button27_<?php echo $ident; ?> " onclick="nextPage_<?php echo $ident; ?> ()"/> </td> </tr> <tr style="background: transparent;"> <td style="border:none;background: transparent;padding: 0px !important;"> <img src="<?php echo plugins_url('', __FILE__); ?> /images/back.png" style="cursor:pointer; display:none; border:none;background: transparent;" id="button29_<?php echo $ident; ?> " onclick="openLibTable_<?php echo $ident; ?> ()"/> </td> </tr> <tr style="background: transparent;"> <td style="border:none;background: transparent;padding: 0px !important;"> <img style="cursor:pointer;border:none;background: transparent; position:relative;" id="button19_<?php echo $ident; ?> " class="show_vid_<?php echo $ident; ?> " src="<?php echo plugins_url('', __FILE__); ?> /images/lib.png"/> </td> </tr> </table> </td> </tr> <tr id="tracklist_down_<?php echo $ident; ?> " style="display:none;background: transparent"> <td height="12px" colspan="2" style="text-align:right;border:none;background: transparent;padding: 5px !important;"> <div onmouseover="this.style.background='rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)); ?> ,0.4)'" onmouseout="this.style.background='none'" id="scroll" style="overflow:hidden;width:50%;height:100%;text-align:center;float:right;cursor:pointer;" onmousedown="scrollBot=setInterval('scrollBottom_<?php echo $ident; ?> ()', 30)" onmouseup="clearInterval(scrollBot)" onclick="scrollBottom_<?php echo $ident; ?> ()"> <img src="<?php echo plugins_url('', __FILE__); ?> /images/bot.png" style="cursor:pointer;border:none;background: transparent;padding:0px !important;" id="button26_<?php echo $ident; ?> "/> </div> </td> </tr> </table> </div> <script type="text/javascript"> function flashShare(type, b, c) { u = location.href; u = u.replace('/?', '/index.php?'); if (u.search('&AlbumId') != -1) { var u_part2 = ''; u_part2 = u.substring(u.search('&TrackId') + 2, 1000) if (u_part2.search('&') != -1) { u_part2 = u_part2.substring(u_part2.search('&'), 1000); } u = u.replace(u.substring(u.search('&AlbumId'), 1000), '') + u_part2; } if (!location.search) u = u + '?'; else u = u + '&'; t = document.title; switch (type) { case 'fb': window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u + 'AlbumId=' + b + '&TrackId=' + c) + '&t=' + encodeURIComponent(t), "Facebook", "menubar=1,resizable=1,width=350,height=250"); break; case 'g': window.open('http://plus.google.com/share?url=' + encodeURIComponent(u + 'AlbumId=' + b + '&TrackId=' + c) + '&t=' + encodeURIComponent(t), "Google", "menubar=1,resizable=1,width=350,height=250"); break; case 'tw': window.open('http://twitter.com/home/?status=' + encodeURIComponent(u + 'AlbumId=' + b + '&TrackId=' + c), "Twitter", "menubar=1,resizable=1,width=350,height=250"); break; } } </script> <div id="embed_Url_div_<?php echo $ident; ?> " style="display:none;text-align:center;background-color:rgba(0,0,0,0.5); height:160px;width:300px;position:relative;left:<?php echo $theme->appWidth / 2 - 150; ?> px;top:-<?php echo $theme->appHeight / 2 + 75; ?> px"> <textarea onclick="jQuery('#embed_Url_<?php echo $ident; ?> ').focus(); jQuery('#embed_Url_<?php echo $ident; ?> ').select();" id="embed_Url_<?php echo $ident; ?> " readonly="readonly" style="font-size:11px;width:285px;overflow-y:scroll;resize:none;height:100px;position:relative;top:5px;"></textarea> <span style="position:relative;top:10px;"><button onclick="jQuery('#embed_Url_div_<?php echo $ident; ?> ').css('display','none')" style="border:0px"> Close </button><p style="color:white">Press Ctrl+C to copy the embed code to clipboard</p></span> </div> <div id="share_buttons_<?php echo $ident; ?> " style="text-align:center;height:113px;width:30px;background-color:rgba(0,0,0,0.5);position:relative;z-index:20000;top:<?php echo $share_top; ?> ;display:none;"> <img onclick="flashShare('fb',document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value,document.getElementById('current_track_<?php echo $ident; ?> ').value)" style="cursor:pointer; border:none;background: transparent;padding:0px;max-width: auto;" src="<?php echo plugins_url('', __FILE__); ?> /images/facebook.png"/><br> <img onclick="flashShare('tw',document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value,document.getElementById('current_track_<?php echo $ident; ?> ').value)" style="cursor:pointer; border:none;background: transparent;padding:0px;max-width: auto;" src="<?php echo plugins_url('', __FILE__); ?> /images/twitter.png"/><br> <img onclick="flashShare('g',document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value,document.getElementById('current_track_<?php echo $ident; ?> ').value)" style="cursor:pointer; border:none;background: transparent;padding:0px;max-width: auto;" src="<?php echo plugins_url('', __FILE__); ?> /images/googleplus.png"/><br> <img onclick="jQuery('#embed_Url_div_<?php echo $ident; ?> ').css('display','');embed_url_<?php echo $ident; ?> (document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value,document.getElementById('current_track_<?php echo $ident; ?> ').value)" style="cursor:pointer; border:none; background: transparent;padding:0px;max-width: auto;" src="<?php echo plugins_url('', __FILE__); ?> /images/embed.png"/> </div> </div> <?php $sufffle = str_replace('Shuffle', 'shuffle', $theme->defaultShuffle); if ($sufffle == 'shuffleOff') { $shuffle = 0; } else { $shuffle = 1; } $admin_url = admin_url('admin-ajax.php?action=spiderVeideoPlayervideoonly'); ?> <input type="hidden" id="color_<?php echo $ident; ?> " value="<?php echo "#" . $theme->ctrlsMainColor; ?> "/> <input type="hidden" id="support_<?php echo $ident; ?> " value="1"/> <input type="hidden" id="event_type_<?php echo $ident; ?> " value="mouseenter"/> <input type="hidden" id="current_track_<?php echo $ident; ?> " value="0"/> <input type="hidden" id="shuffle_<?php echo $ident; ?> " value="<?php echo $shuffle; ?> "/> <input type="hidden" id="scroll_height_<?php echo $ident; ?> " value="0"/> <input type="hidden" id="scroll_height2_<?php echo $ident; ?> " value="0"/> <input type="hidden" value="<?php echo $l; ?> " id="lib_table_count_<?php echo $ident; ?> "/> <input type="hidden" value="" id="current_lib_table_<?php echo $ident; ?> "/> <input type="hidden" value="0" id="current_playlist_table_<?php echo $ident; ?> "/> <input type="hidden" value="<?php echo $theme->defaultRepeat; ?> " id="repeat_<?php echo $ident; ?> "/> <input type="hidden" value="0" id="HD_on_<?php echo $ident; ?> "/> <input type="hidden" value="" id="volumeBar_width_<?php echo $ident; ?> "/> <script src="http://www.youtube.com/player_api"></script> <script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script> <script> function is_youtube_video_<?php echo $ident; ?> (){ if(jQuery("#videoID_<?php echo $ident; ?> ").attr("src").indexOf("youtube.com/")>-1 || jQuery("#videoID_<?php echo $ident; ?> ").attr("src").indexOf("vimeo.com/")>-1){ return true;} return false; } var ua = navigator.userAgent.toLowerCase(); var isAndroid = ua.indexOf("android") > -1; var next_vid_<?php echo $ident; ?> = false; var player_<?php echo $ident; ?> ; var vimeo_play_<?php echo $ident; ?> = false; var youtube_ready_<?php echo $ident; ?> = false; function onPlayerReady_<?php echo $ident; ?> (event) { youtube_ready_<?php echo $ident; ?> = true; <?php if ($theme->autoPlay == 1) { echo "player_" . $ident . ".playVideo();"; } ?> if(next_vid_<?php echo $ident; ?> ){ player_<?php echo $ident; ?> .playVideo();} } function onPlayerStateChange_<?php echo $ident; ?> (event) { if(event.data === 0) { if (jQuery('#repeat_<?php echo $ident; ?> ').val() == 'repeatOne') { {if(youtube_ready_<?php echo $ident; ?> )player_<?php echo $ident; ?> .playVideo();} paly_<?php echo $ident; ?> .css('display', 'none'); pause_<?php echo $ident; ?> .css('display', ''); } if (jQuery('#repeat_<?php echo $ident; ?> ').val() == 'repeatAll') { jQuery('#global_body_<?php echo $ident; ?> .playNext_<?php echo $ident; ?> ').click(); setTimeout(function(){player_<?php echo $ident; ?> .playVideo()},0); } }if(event.data == YT.PlayerState.PLAYING){ paly_<?php echo $ident; ?> .css('display', 'none'); pause_<?php echo $ident; ?> .css('display', ''); } if(event.data == YT.PlayerState.PAUSED) { paly_<?php echo $ident; ?> .css('display', ''); pause_<?php echo $ident; ?> .css('display', 'none'); } }; function onVimeoReady_<?php echo $ident; ?> (){ youtube_ready_<?php echo $ident; ?> = true; try{ player_<?php echo $ident; ?> .addEvent('play', onPlay_<?php echo $ident; ?> ); player_<?php echo $ident; ?> .addEvent('pause', onPause_<?php echo $ident; ?> ); player_<?php echo $ident; ?> .addEvent('finish', onFinish_<?php echo $ident; ?> ); }catch(err){ return false; } } function onPlay_<?php echo $ident; ?> (id){ vimeo_play_<?php echo $ident; ?> = true; paly_<?php echo $ident; ?> .css('display', 'none'); pause_<?php echo $ident; ?> .css('display', ''); } function onPause_<?php echo $ident; ?> (id){ vimeo_play_<?php echo $ident; ?> = false; paly_<?php echo $ident; ?> .css('display', ''); pause_<?php echo $ident; ?> .css('display', 'none'); } function onFinish_<?php echo $ident; ?> (id){ if (jQuery('#repeat_<?php echo $ident; ?> ').val() == 'repeatOne') { {if(youtube_ready_<?php echo $ident; ?> )player_<?php echo $ident; ?> .playVideo();} paly_<?php echo $ident; ?> .css('display', 'none'); pause_<?php echo $ident; ?> .css('display', ''); } if (jQuery('#repeat_<?php echo $ident; ?> ').val() == 'repeatAll') { jQuery('#global_body_<?php echo $ident; ?> .functiom<?php echo $ident; ?> ').click(); } } function youtube_control_<?php echo $ident; ?> (src){ jQuery("#time_<?php echo $ident; ?> ").parent('td').hide(); jQuery("#control_<?php echo $ident; ?> .btnPlay").parent('td').hide(); jQuery(".progressBar_<?php echo $ident; ?> ").hide(); jQuery("#volumeTD_<?php echo $ident; ?> ").parent('td').hide(); jQuery(".hd_<?php echo $ident; ?> ").parent('td').hide(); jQuery(".fullScreen_<?php echo $ident; ?> ").parent('td').hide(); var button_width = <?php echo $theme->appWidth; ?> - 240; jQuery("#control_<?php echo $ident; ?> ").attr('style',"overflow:hidden;"); jQuery("#control_<?php echo $ident; ?> ").attr("style",jQuery("#control_<?php echo $ident; ?> ").attr("style")+" top : auto !important;bottom: 0px;width:"+button_width+"px; margin-left:160px;height: 27px;line-height: 27px;background: transparent;"); jQuery("#control_<?php echo $ident; ?> #control_btns_<?php echo $ident; ?> ").css({"line-height":"27px","width":"100%"}); jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css({'background':'transparent','margin-left': '160px','text-align': 'inherit','top':'-130px'}); jQuery("#videoID_<?php echo $ident; ?> ").replaceWith('<iframe id="videoID_<?php echo $ident; ?> " type="text/html" width="<?php echo $theme->appWidth; ?> " height="<?php echo $theme->appHeight; ?> " src="'+src+'" frameborder="0" allowfullscreen></iframe>'); jQuery("#videoID_<?php echo $ident; ?> ").load(function(){ youtube_ready_<?php echo $ident; ?> = false; set_youtube_player_<?php echo $ident; ?> (); var ua = navigator.userAgent.toLowerCase(); var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); if(!isAndroid) { play_<?php echo $ident; ?> (); }else{ paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } }); } function vimeo_control_<?php echo $ident; ?> (src){ jQuery("#time_<?php echo $ident; ?> ").parent('td').hide(); jQuery("#control_<?php echo $ident; ?> .btnPlay").parent('td').hide(); jQuery(".progressBar_<?php echo $ident; ?> ").hide(); jQuery("#volumeTD_<?php echo $ident; ?> ").parent('td').hide(); jQuery(".hd_<?php echo $ident; ?> ").parent('td').hide(); jQuery(".fullScreen_<?php echo $ident; ?> ").parent('td').hide(); var button_width = <?php echo $theme->appWidth; ?> - 240; jQuery("#control_<?php echo $ident; ?> ").attr('style',"overflow:hidden;"); jQuery("#control_<?php echo $ident; ?> ").attr("style",jQuery("#control_1").attr("style")+"top : auto !important;bottom: 0px;width:"+button_width+"px; margin-left:160px;background: transparent;height: 27px;"); jQuery("#control_<?php echo $ident; ?> #control_btns_<?php echo $ident; ?> ").css({"line-height":"27px","width":"100%"}); jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css({'background':'transparent','margin-left': '160px','text-align': 'inherit','top':'-130px'}); if(typeof player_<?php echo $ident; ?> != "undefined" && player_<?php echo $ident; ?> !=null){ if(typeof player_<?php echo $ident; ?> .api == "function"){ jQuery("#videoID_<?php echo $ident; ?> ").attr("src",src+';player_id=videoID_<?php echo $ident; ?> ;badge=0;byline=0;portrait=0;'); return false;} } jQuery("#videoID_<?php echo $ident; ?> ").replaceWith('<iframe id="videoID_<?php echo $ident; ?> " type="text/html" name="videoID_<?php echo $ident; ?> " width="<?php echo $theme->appWidth; ?> " height="<?php echo $theme->appHeight; ?> " src="'+src+';player_id=videoID_<?php echo $ident; ?> ;badge=0;byline=0;portrait=0;" frameborder="0" allowfullscreen></iframe>'); jQuery("#videoID_<?php echo $ident; ?> ").load(function(){ youtube_ready_<?php echo $ident; ?> = false; vimeo_play_<?php echo $ident; ?> = false; set_vimeo_player_<?php echo $ident; ?> (); var ua = navigator.userAgent.toLowerCase(); var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); if(!isAndroid) { play_<?php echo $ident; ?> (); }else{ paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } }); } function set_youtube_player_<?php echo $ident; ?> (){ if(typeof YT.Player != 'undefined'){ player_<?php echo $ident; ?> = new YT.Player('videoID_<?php echo $ident; ?> ', { events: {'onReady':onPlayerReady_<?php echo $ident; ?> ,'onStateChange': onPlayerStateChange_<?php echo $ident; ?> } }); }else setTimeout(function(){set_youtube_player_<?php echo $ident; ?> ()},200); } function set_vimeo_player_<?php echo $ident; ?> (){ if(typeof $f != 'undefined'){ jQuery('#videoID_<?php echo $ident; ?> ').each(function(){ player_<?php echo $ident; ?> = $f(this); player_<?php echo $ident; ?> .addEvent('ready', onVimeoReady_<?php echo $ident; ?> ); player_<?php echo $ident; ?> .playVideo = function(){ if(!vimeo_play_<?php echo $ident; ?> ) setTimeout(function(){player_<?php echo $ident; ?> .playVideo();},500); player_<?php echo $ident; ?> .api("play"); } player_<?php echo $ident; ?> .pauseVideo = function(){player_<?php echo $ident; ?> .api("pause");} }); }else setTimeout(function(){set_vimeo_player_<?php echo $ident; ?> ()},200); } function video_control_<?php echo $ident; ?> (src){ jQuery("#time_<?php echo $ident; ?> ").parent('td').show(); jQuery("#control_<?php echo $ident; ?> .btnPlay").parent('td').show(); jQuery(".progressBar_<?php echo $ident; ?> ").show(); jQuery("#volumeTD_<?php echo $ident; ?> ").parent('td').show(); jQuery(".hd_<?php echo $ident; ?> ").parent('td').show(); jQuery(".fullScreen_<?php echo $ident; ?> ").parent('td').show(); jQuery("#control_<?php echo $ident; ?> ").attr('style',"overflow:hidden;"); jQuery("#control_<?php echo $ident; ?> #control_btns_<?php echo $ident; ?> ").css("line-height",""); jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css({'background':'transparent','margin-left': '','text-align': 'center','top':'<?php echo $share_top; ?> '}); jQuery("#videoID_<?php echo $ident; ?> ").replaceWith('<video ontimeupdate="timeUpdate_<?php echo $ident; ?> ()" ondurationchange="durationChange_<?php echo $ident; ?> ();" id="videoID_<?php echo $ident; ?> " src="'+src+'" poster="<?php echo $vtttt; ?> " style="width:100%; height:100%;margin:0px;position: absolute;top:0px;"><p>Your browser does not support the video tag.</p></video>'); video_<?php echo $ident; ?> = jQuery('#videoID_<?php echo $ident; ?> '); v_timeupdate_<?php echo $ident; ?> (video_<?php echo $ident; ?> ); v_ended_<?php echo $ident; ?> (video_<?php echo $ident; ?> ); youtube_ready_<?php echo $ident; ?> = false; vimeo_play_<?php echo $ident; ?> = false; player_<?php echo $ident; ?> = null; } var video_<?php echo $ident; ?> = jQuery('#videoID_<?php echo $ident; ?> '); var paly_<?php echo $ident; ?> = jQuery('#global_body_<?php echo $ident; ?> .btnPlay'); var pause_<?php echo $ident; ?> = jQuery('#global_body_<?php echo $ident; ?> .btnPause'); var check_play_<?php echo $ident; ?> = false; function embed_url_<?php echo $ident; ?> (a, b) { // jQuery('#embed_Url_<?php echo $ident; ?> ').html('<iframe allowFullScreen allowTransparency="true" frameborder="0" width="<?php echo $theme->appWidth; ?> " height="<?php echo $theme->appHeight; ?> " src="' + location.href + '&AlbumId=' + a + '&TrackId=' + b + '" type="text/html" ></iframe>') jQuery('#embed_Url_<?php echo $ident; ?> ').focus(); jQuery('#embed_Url_<?php echo $ident; ?> ').select(); } jQuery('#global_body_<?php echo $ident; ?> .share_<?php echo $ident; ?> , #global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').on('mouseenter', function () { left = jQuery('#global_body_<?php echo $ident; ?> .share_<?php echo $ident; ?> ').position().left; if (parseInt(jQuery('#global_body_<?php echo $ident; ?> #play_list_<?php echo $ident; ?> ').css('width')) == 0) jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css('left', left) else <?php if ($theme->playlistPos == 1) { ?> jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css('left', left +<?php echo $theme->playlistWidth; ?> ) <?php } else { ?> jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css('left', left) <?php } ?> jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css('display', '') }) jQuery('#global_body_<?php echo $ident; ?> .share_<?php echo $ident; ?> ,#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').on('mouseleave', function () { jQuery('#global_body_<?php echo $ident; ?> #share_buttons_<?php echo $ident; ?> ').css('display', 'none') }) if (<?php echo $theme->autoPlay; ?> ==1 ) { setTimeout(function () { jQuery('#thumb_0_<?php echo $ident; ?> ').click() }, 500); } <?php if ($sufffle == 'shuffleOff') { ?> if (jQuery('#global_body_<?php echo $ident; ?> .shuffle_<?php echo $ident; ?> ')[0]) { jQuery('#global_body_<?php echo $ident; ?> .shuffle_<?php echo $ident; ?> ')[0].style.display = "none"; jQuery('#global_body_<?php echo $ident; ?> .shuffle_<?php echo $ident; ?> ')[1].style.display = ""; } <?php } else { ?> if (jQuery('#global_body_<?php echo $ident; ?> .shuffle_<?php echo $ident; ?> ')[0]) { jQuery('#global_body_<?php echo $ident; ?> .shuffle_<?php echo $ident; ?> ')[1].style.display = "none"; jQuery('#global_body_<?php echo $ident; ?> .shuffle_<?php echo $ident; ?> ')[0].style.display = ""; } <?php } ?> jQuery('#global_body_<?php echo $ident; ?> .fullScreen_<?php echo $ident; ?> ').on('click', function () { if (video_<?php echo $ident; ?> [0].mozRequestFullScreen) video_<?php echo $ident; ?> [0].mozRequestFullScreen(); if (video_<?php echo $ident; ?> [0].webkitEnterFullscreen) video_<?php echo $ident; ?> [0].webkitEnterFullscreen() }) jQuery('#global_body_<?php echo $ident; ?> .stop').on('click', function () { video_<?php echo $ident; ?> [0].currentTime = 0; video_<?php echo $ident; ?> [0].pause(); paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); }) <?php if ($theme->defaultRepeat == 'repeatOff') { ?> if (jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[0]) { jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[0].style.display = "none"; jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[1].style.display = ""; jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[2].style.display = "none"; } <?php } ?> <?php if ($theme->defaultRepeat == 'repeatOne') { ?> if (jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[0]) { jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[0].style.display = "none"; jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[1].style.display = "none"; jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[2].style.display = ""; jQuery('#videoID_<?php echo $ident; ?> ').attr('scr',jQuery('#videoID_<?php echo $ident; ?> ').attr('scr')+"&loop=1"); } <?php } ?> <?php if ($theme->defaultRepeat == 'repeatAll') { ?> if (jQuery('.repeat_<?php echo $ident; ?> ')[0]) { jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[0].style.display = ""; jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[1].style.display = "none"; jQuery('#global_body_<?php echo $ident; ?> .repeat_<?php echo $ident; ?> ')[2].style.display = "none"; } <?php } ?> jQuery('.repeat_<?php echo $ident; ?> ').on('click', function () { repeat_<?php echo $ident; ?> = jQuery('#repeat_<?php echo $ident; ?> ').val(); switch (repeat_<?php echo $ident; ?> ) { case 'repeatOff': jQuery('#repeat_<?php echo $ident; ?> ').val('repeatOne'); jQuery('.repeat_<?php echo $ident; ?> ')[0].style.display = "none"; jQuery('.repeat_<?php echo $ident; ?> ')[1].style.display = "none"; jQuery('.repeat_<?php echo $ident; ?> ')[2].style.display = ""; jQuery('#videoID_<?php echo $ident; ?> ').attr('scr',jQuery('#videoID_<?php echo $ident; ?> ').attr('scr')+"&loop=1"); break; case 'repeatOne': jQuery('#repeat_<?php echo $ident; ?> ').val('repeatAll'); jQuery('.repeat_<?php echo $ident; ?> ')[0].style.display = ""; jQuery('.repeat_<?php echo $ident; ?> ')[1].style.display = "none"; jQuery('.repeat_<?php echo $ident; ?> ')[2].style.display = "none"; break; case 'repeatAll': jQuery('#repeat_<?php echo $ident; ?> ').val('repeatOff'); jQuery('.repeat_<?php echo $ident; ?> ')[0].style.display = "none"; jQuery('.repeat_<?php echo $ident; ?> ')[1].style.display = ""; jQuery('.repeat_<?php echo $ident; ?> ')[2].style.display = "none"; break; } }) jQuery('#global_body_<?php echo $ident; ?> #voulume_img_<?php echo $ident; ?> ').live('click', function () { if (jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ')[0].style.width != '0%') { video_<?php echo $ident; ?> [0].volume = 0; jQuery('body #volumeBar_width_<?php echo $ident; ?> ').val(jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ')[0].style.width) jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ').css('width', '0%') } else { video_<?php echo $ident; ?> [0].volume = parseInt(jQuery('body #volumeBar_width_<?php echo $ident; ?> ').val()) / 100; jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ').css('width', jQuery('body #volumeBar_width_<?php echo $ident; ?> ').val()) } }) jQuery('.hd_<?php echo $ident; ?> ').live('click', function () { current_time_<?php echo $ident; ?> = video_<?php echo $ident; ?> [0].currentTime; HD_on_<?php echo $ident; ?> = jQuery('#HD_on_<?php echo $ident; ?> ').val(); current_playlist_table_<?php echo $ident; ?> = jQuery('#current_playlist_table_<?php echo $ident; ?> ').val(); current_track_<?php echo $ident; ?> = jQuery('#current_track_<?php echo $ident; ?> ').val(); if (jQuery('#track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).find('#urlHD_' + current_track_<?php echo $ident; ?> + '_' +<?php echo $ident; ?> ).val() && HD_on_<?php echo $ident; ?> == 0) { document.getElementById('videoID_<?php echo $ident; ?> ').src = jQuery('#track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).find('#urlHD_' + current_track_<?php echo $ident; ?> + '_' +<?php echo $ident; ?> ).val(); play_<?php echo $ident; ?> (); setTimeout('video_<?php echo $ident; ?> [0].currentTime=current_time_<?php echo $ident; ?> ', 500) jQuery('#HD_on_<?php echo $ident; ?> ').val(1); } if (jQuery('#track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).find('#urlHD_' + current_track_<?php echo $ident; ?> + '_' +<?php echo $ident; ?> ).val() && HD_on_<?php echo $ident; ?> == 1) { jQuery('#track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).find('#thumb_' + current_track_<?php echo $ident; ?> + '_' +<?php echo $ident; ?> ).click(); setTimeout('video_<?php echo $ident; ?> [0].currentTime=current_time_<?php echo $ident; ?> ', 500) jQuery('#HD_on_<?php echo $ident; ?> ').val(0); } }) function support_<?php echo $ident; ?> (i, j) { if (jQuery('#track_list_<?php echo $ident; ?> _' + i).find('#vid_type_' + j + '_<?php echo $ident; ?> ').val() != 'http') { jQuery('#not_supported_<?php echo $ident; ?> ').css('display', ''); jQuery('#support_<?php echo $ident; ?> ').val(0); } else { jQuery('#not_supported_<?php echo $ident; ?> ').css('display', 'none'); jQuery('#support_<?php echo $ident; ?> ').val(1); } } jQuery('.play_<?php echo $ident; ?> ').on('click', function () { video_<?php echo $ident; ?> [0].play(); }) jQuery('.pause_<?php echo $ident; ?> ').on('click', function () { video_<?php echo $ident; ?> [0].pause(); }) function vid_select_<?php echo $ident; ?> (x) { jQuery("div.vid_thumb_<?php echo $ident; ?> ").each(function () { if (jQuery(this).find("img")) { jQuery(this).find("img").hide(20); if (jQuery(this).find("img")[0]) jQuery(this).find("img")[0].style.display = "none"; } jQuery(this).css('background', 'none'); }) jQuery("div.vid_thumb_<?php echo $ident; ?> ").each(function () { jQuery(this).mouseenter(function () { if (jQuery(this).find("img")) jQuery(this).find("img").slideDown(100); jQuery(this).css('background', 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> )') jQuery(this).css('color', '#<?php echo $theme->textHoverColor; ?> ') }) jQuery(this).mouseleave(function () { if (jQuery(this).find("img")) jQuery(this).find("img").slideUp(300); jQuery(this).css('background', 'none'); jQuery(this).css('color', '#<?php echo $theme->textColor; ?> ') }); jQuery(this).css('color', '#<?php echo $theme->textColor; ?> ') }) jQuery(x).unbind('mouseleave mouseenter'); if (jQuery(x).find("img")) jQuery(x).find("img").show(10); jQuery(x).css('background', 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> )') jQuery(x).css('color', '#<?php echo $theme->textSelectedColor; ?> ') } function vid_select2_<?php echo $ident; ?> (x) { jQuery("p.vid_title_<?php echo $ident; ?> ").each(function () { this.onmouseover = function () { this.style.color = '#' + '<?php echo $theme->textHoverColor; ?> '; this.style.background = 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)); ?> ,0.4)' } this.onmouseout = function () { this.style.color = '<?php echo '#' . $theme->textColor; ?> '; this.style.background = " none" } jQuery(this).css('background', 'none'); jQuery(this).css('color', '#<?php echo $theme->textColor; ?> '); }) jQuery(x).css('background', 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> )') jQuery(x).css('color', '#<?php echo $theme->textSelectedColor; ?> ') x.onmouseover = null; x.onmouseout = null; } function playlist_select_<?php echo $ident; ?> (x) { jQuery("#global_body_<?php echo $ident; ?> td.playlist_td_<?php echo $ident; ?> ").each(function () { jQuery(this).css('background', 'none'); jQuery(this).css('color', '#<?php echo $theme->textColor; ?> '); this.onmouseover = function () { this.style.color = '#' + '<?php echo $theme->textHoverColor; ?> '; this.style.background = 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)); ?> ,<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)); ?> ,0.4)' } this.onmouseout = function () { this.style.color = '<?php echo '#' . $theme->textColor; ?> '; this.style.background = " none" } }) jQuery('#playlist_' + x + '_<?php echo $ident; ?> ').css('background', 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgSelectedColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> )') jQuery('#playlist_' + x + '_<?php echo $ident; ?> ').css('color', '#<?php echo $theme->textSelectedColor; ?> ') jQuery('#playlist_' + x + '_<?php echo $ident; ?> ')[0].onmouseover = null jQuery('#playlist_' + x + '_<?php echo $ident; ?> ')[0].onmouseout = null } jQuery('.shuffle_<?php echo $ident; ?> ').on('click', function () { if (jQuery('#shuffle_<?php echo $ident; ?> ').val() == 0) { jQuery('#shuffle_<?php echo $ident; ?> ').val(1); jQuery('.shuffle_<?php echo $ident; ?> ')[1].style.display = "none"; jQuery('.shuffle_<?php echo $ident; ?> ')[0].style.display = ""; } else { jQuery('#shuffle_<?php echo $ident; ?> ').val(0); jQuery('.shuffle_<?php echo $ident; ?> ')[0].style.display = "none"; jQuery('.shuffle_<?php echo $ident; ?> ')[1].style.display = ""; } }); jQuery("div.vid_thumb_<?php echo $ident; ?> ").each(function () { jQuery(this).mouseenter(function () { if (jQuery(this).find("img")) jQuery(this).find("img").slideToggle(100); jQuery(this).css('background', 'rgba(<?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 0, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 2, 2)); ?> , <?php echo HEXDEC(SUBSTR($theme->itemBgHoverColor, 4, 2)); ?> , <?php echo $theme->framesBgAlpha / 100; ?> )') jQuery(this).css('color', '#<?php echo $theme->textHoverColor; ?> ') }) jQuery(this).mouseleave(function () { if (jQuery(this).find("img")) jQuery(this).find("img").slideToggle(300); jQuery(this).css('background', 'none'); jQuery(this).css('color', '#<?php echo $theme->textColor; ?> ') }); }) function timeUpdate_<?php echo $ident; ?> () { if (parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime / 60) < 10 && parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime % 60 < 10)) document.getElementById('time_<?php echo $ident; ?> ').innerHTML = '0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime / 60) + ':0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime % 60); if (parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime / 60) < 10) document.getElementById('time_<?php echo $ident; ?> ').innerHTML = '0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime / 60) + ':' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime % 60); if (parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime % 60) < 10) document.getElementById('time_<?php echo $ident; ?> ').innerHTML = '0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime / 60) + ':0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').currentTime % 60); } function durationChange_<?php echo $ident; ?> () { if (parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration / 60) < 10 && parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration % 60 < 10)) document.getElementById('duration_<?php echo $ident; ?> ').innerHTML = '0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration / 60) + ':0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration % 60); if (parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration / 60) < 10) document.getElementById('duration_<?php echo $ident; ?> ').innerHTML = '0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration / 60) + ':' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration % 60); if (parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration % 60) < 10) document.getElementById('duration_<?php echo $ident; ?> ').innerHTML = parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration / 60) + ':0' + parseInt(document.getElementById('videoID_<?php echo $ident; ?> ').duration % 60); } function scrollBottom_<?php echo $ident; ?> () { current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; if (document.getElementById('scroll_div_' + current_playlist_table_<?php echo $ident; ?> + '_<?php echo $ident; ?> ').offsetHeight + parseInt(document.getElementById("scroll_div_" + current_playlist_table_<?php echo $ident; ?> + '_<?php echo $ident; ?> ').style.top) + 55 <= document.getElementById('global_body_<?php echo $ident; ?> ').offsetHeight) return false; document.getElementById('scroll_height_<?php echo $ident; ?> ').value = parseInt(document.getElementById('scroll_height_<?php echo $ident; ?> ').value) + 5 document.getElementById("scroll_div_" + current_playlist_table_<?php echo $ident; ?> + '_<?php echo $ident; ?> ').style.top = "-" + document.getElementById('scroll_height_<?php echo $ident; ?> ').value + "px"; } ; function scrollTop_<?php echo $ident; ?> () { current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; if (document.getElementById('scroll_height_<?php echo $ident; ?> ').value <= 0) return false; document.getElementById('scroll_height_<?php echo $ident; ?> ').value = parseInt(document.getElementById('scroll_height_<?php echo $ident; ?> ').value) - 5 document.getElementById("scroll_div_" + current_playlist_table_<?php echo $ident; ?> + '_<?php echo $ident; ?> ').style.top = "-" + document.getElementById('scroll_height_<?php echo $ident; ?> ').value + "px"; } ; function scrollBottom2_<?php echo $ident; ?> () { current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; if (!current_playlist_table_<?php echo $ident; ?> ) { current_playlist_table_<?php echo $ident; ?> = 0; } if (document.getElementById('scroll_div2_' + current_playlist_table_<?php echo $ident; ?> + '_<?php echo $ident; ?> ').offsetHeight + parseInt(document.getElementById("scroll_div2_" + current_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").style.top) + 150 <= document.getElementById('global_body_<?php echo $ident; ?> ').offsetHeight) return false; document.getElementById('scroll_height2_<?php echo $ident; ?> ').value = parseInt(document.getElementById('scroll_height2_<?php echo $ident; ?> ').value) + 5 document.getElementById("scroll_div2_" + current_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").style.top = "-" + document.getElementById('scroll_height2_<?php echo $ident; ?> ').value + "px"; } ; function scrollTop2_<?php echo $ident; ?> () { current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; if (document.getElementById('scroll_height2_<?php echo $ident; ?> ').value <= 0) return false; document.getElementById('scroll_height2_<?php echo $ident; ?> ').value = parseInt(document.getElementById('scroll_height2_<?php echo $ident; ?> ').value) - 5 document.getElementById("scroll_div2_" + current_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").style.top = "-" + document.getElementById('scroll_height2_<?php echo $ident; ?> ').value + "px"; } ; function openPlaylist_<?php echo $ident; ?> (i, j) { document.getElementById('scroll_height_<?php echo $ident; ?> ').value = 0; lib_table_count_<?php echo $ident; ?> = document.getElementById('lib_table_count_<?php echo $ident; ?> ').value; for (lib_table = 0; lib_table < lib_table_count_<?php echo $ident; ?> ; lib_table++) { document.getElementById('lib_table_' + lib_table + '_<?php echo $ident; ?> ').style.display = "none"; } jQuery("#playlist_table_" + i + "_<?php echo $ident; ?> ").fadeIn(700); document.getElementById('current_lib_table_<?php echo $ident; ?> ').value = j; document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value = i; document.getElementById('tracklist_down_<?php echo $ident; ?> ').style.display = ""; document.getElementById('tracklist_up_<?php echo $ident; ?> ').style.display = ""; document.getElementById('button29_<?php echo $ident; ?> ').style.display = "block"; document.getElementById('button27_<?php echo $ident; ?> ').onclick = function () { nextPlaylist_<?php echo $ident; ?> () }; document.getElementById('button28_<?php echo $ident; ?> ').onclick = function () { prevPlaylist_<?php echo $ident; ?> () }; } function nextPlaylist_<?php echo $ident; ?> () { document.getElementById('scroll_height_<?php echo $ident; ?> ').value = 0; lib_table_count_<?php echo $ident; ?> = document.getElementById('lib_table_count_<?php echo $ident; ?> ').value; for (lib_table = 0; lib_table < lib_table_count_<?php echo $ident; ?> ; lib_table++) { document.getElementById('lib_table_' + lib_table + '_<?php echo $ident; ?> ').style.display = "none"; } current_lib_table_<?php echo $ident; ?> = document.getElementById('current_lib_table_<?php echo $ident; ?> ').value; next_playlist_table_<?php echo $ident; ?> = parseInt(document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value) + 1; current_playlist_table_<?php echo $ident; ?> = parseInt(document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value); if (next_playlist_table_<?php echo $ident; ?> ><?php echo count($playlist_array) - 2; ?> ) return false; jQuery("#playlist_table_" + current_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").css('display', 'none'); jQuery("#playlist_table_" + next_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").fadeIn(700); document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value = next_playlist_table_<?php echo $ident; ?> ; document.getElementById('tracklist_down_<?php echo $ident; ?> ').style.display = ""; document.getElementById('tracklist_up_<?php echo $ident; ?> ').style.display = ""; document.getElementById('button29_<?php echo $ident; ?> ').style.display = "block"; } function prevPlaylist_<?php echo $ident; ?> () { document.getElementById('scroll_height_<?php echo $ident; ?> ').value = 0; lib_table_count_<?php echo $ident; ?> = document.getElementById('lib_table_count_<?php echo $ident; ?> ').value; for (lib_table = 0; lib_table < lib_table_count_<?php echo $ident; ?> ; lib_table++) { document.getElementById('lib_table_' + lib_table + '_<?php echo $ident; ?> ').style.display = "none"; } current_lib_table_<?php echo $ident; ?> = document.getElementById('current_lib_table_<?php echo $ident; ?> ').value; prev_playlist_table_<?php echo $ident; ?> = parseInt(document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value) - 1; current_playlist_table_<?php echo $ident; ?> = parseInt(document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value); if (prev_playlist_table_<?php echo $ident; ?> < 0) return false; jQuery("#playlist_table_" + current_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").css('display', 'none'); jQuery("#playlist_table_" + prev_playlist_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").fadeIn(700); document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value = prev_playlist_table_<?php echo $ident; ?> ; document.getElementById('tracklist_down_<?php echo $ident; ?> ').style.display = ""; document.getElementById('tracklist_up_<?php echo $ident; ?> ').style.display = ""; document.getElementById('button29_<?php echo $ident; ?> ').style.display = "block"; } function openLibTable_<?php echo $ident; ?> () { current_lib_table_<?php echo $ident; ?> = document.getElementById('current_lib_table_<?php echo $ident; ?> ').value; document.getElementById('scroll_height_<?php echo $ident; ?> ').value = 0; current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; jQuery("#lib_table_" + current_lib_table_<?php echo $ident; ?> + "_<?php echo $ident; ?> ").fadeIn(700); document.getElementById('playlist_table_' + current_playlist_table_<?php echo $ident; ?> + '_<?php echo $ident; ?> ').style.display = "none"; document.getElementById('tracklist_down_<?php echo $ident; ?> ').style.display = "none"; document.getElementById('tracklist_up_<?php echo $ident; ?> ').style.display = "none"; document.getElementById('button29_<?php echo $ident; ?> ').style.display = "none"; document.getElementById('button27_<?php echo $ident; ?> ').onclick = function () { nextPage_<?php echo $ident; ?> () }; document.getElementById('button28_<?php echo $ident; ?> ').onclick = function () { prevPage_<?php echo $ident; ?> () }; } var next_page_<?php echo $ident; ?> = 0; function nextPage_<?php echo $ident; ?> () { if (next_page_<?php echo $ident; ?> == document.getElementById('lib_table_count_<?php echo $ident; ?> ').value - 1) return false; next_page_<?php echo $ident; ?> = next_page_<?php echo $ident; ?> + 1; for (g = 0; g < document.getElementById('lib_table_count_<?php echo $ident; ?> ').value; g++) { document.getElementById('lib_table_' + g + '_<?php echo $ident; ?> ').style.display = "none"; if (g == next_page_<?php echo $ident; ?> ) { jQuery("#lib_table_" + g + "_<?php echo $ident; ?> ").fadeIn(900); } } } function prevPage_<?php echo $ident; ?> () { if (next_page_<?php echo $ident; ?> == 0) return false; next_page_<?php echo $ident; ?> = next_page_<?php echo $ident; ?> - 1; for (g = 0; g < document.getElementById('lib_table_count_<?php echo $ident; ?> ').value; g++) { document.getElementById('lib_table_' + g + '_<?php echo $ident; ?> ').style.display = "none"; if (g == next_page_<?php echo $ident; ?> ) { jQuery("#lib_table_" + g + "_<?php echo $ident; ?> ").fadeIn(900); } } } function playBTN_<?php echo $ident; ?> () { current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; track_list_<?php echo $ident; ?> = document.getElementById('track_list_<?php echo $ident; ?> ').value; document.getElementById('track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).style.display = "block"; if (current_playlist_table_<?php echo $ident; ?> != track_list_<?php echo $ident; ?> ) document.getElementById('track_list_<?php echo $ident; ?> _' + track_list_<?php echo $ident; ?> ).style.display = "none"; document.getElementById('track_list_<?php echo $ident; ?> ').value = current_playlist_table_<?php echo $ident; ?> ; if(!is_youtube_video_<?php echo $ident; ?> ()){ video_<?php echo $ident; ?> [0].play(); paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); } else if(typeof player_<?php echo $ident; ?> != 'undefined'){if(youtube_ready_<?php echo $ident; ?> )player_<?php echo $ident; ?> .playVideo();} } function play_<?php echo $ident; ?> () { next_vid_<?php echo $ident; ?> = true; if(!is_youtube_video_<?php echo $ident; ?> ()){ video_<?php echo $ident; ?> [0].play(); } else{ if(typeof player_<?php echo $ident; ?> != 'undefined'){ if(youtube_ready_<?php echo $ident; ?> ){ player_<?php echo $ident; ?> .playVideo(); } } } paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); } jQuery('#global_body_<?php echo $ident; ?> .btnPlay <?php if ($theme->clickOnVid == 1) { echo ',#videoID_' . $ident . ''; } ?> , #global_body_<?php echo $ident; ?> .btnPause').on('click', function () { if(!is_youtube_video_<?php echo $ident; ?> ()){ if (video_<?php echo $ident; ?> [0].paused) { video_<?php echo $ident; ?> [0].play(); paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); } else { video_<?php echo $ident; ?> [0].pause(); paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } }else{ if(!check_play_<?php echo $ident; ?> ){ if(typeof player_<?php echo $ident; ?> != 'undefined'){if(youtube_ready_<?php echo $ident; ?> )player_<?php echo $ident; ?> .playVideo();} check_play_<?php echo $ident; ?> = true; paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); }else{ if(typeof player_<?php echo $ident; ?> != 'undefined')player_<?php echo $ident; ?> .pauseVideo(); check_play_<?php echo $ident; ?> = false; paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } } return false; }); function check_volume_<?php echo $ident; ?> () { percentage_<?php echo $ident; ?> = video_<?php echo $ident; ?> [0].volume * 100; jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); document.getElementById("play_list_<?php echo $ident; ?> ").style.width = '0px'; document.getElementById("play_list_<?php echo $ident; ?> ").style.display = 'none'; } window.onload = check_volume_<?php echo $ident; ?> (); video_<?php echo $ident; ?> .on('loadedmetadata', function () { jQuery('.duration_<?php echo $ident; ?> ').text(video_<?php echo $ident; ?> [0].duration); }); function v_timeupdate_<?php echo $ident; ?> (el){ el.on('timeupdate', function () { var progress_<?php echo $ident; ?> = jQuery('#global_body_<?php echo $ident; ?> .progressBar_<?php echo $ident; ?> '); var currentPos_<?php echo $ident; ?> = el[0].currentTime; //Get currenttime var maxduration_<?php echo $ident; ?> = el[0].duration; //Get video duration var percentage_<?php echo $ident; ?> = 100 * currentPos_<?php echo $ident; ?> / maxduration_<?php echo $ident; ?> ; //in % var position_<?php echo $ident; ?> = (<?php echo $theme->appWidth; ?> * percentage_<?php echo $ident; ?> / 100 ) -progress_<?php echo $ident; ?> .offset().left; jQuery('#global_body_<?php echo $ident; ?> .timeBar_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); }); } function v_ended_<?php echo $ident; ?> (el){ el.on('ended', function () { if (jQuery('#repeat_<?php echo $ident; ?> ').val() == "repeatOne") { el[0].currentTime = 0; if(!is_youtube_video_<?php echo $ident; ?> ()) el[0].play(); else if(typeof player_<?php echo $ident; ?> != 'undefined'){if(youtube_ready_<?php echo $ident; ?> )player_<?php echo $ident; ?> .playVideo();} paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); } if (jQuery('#repeat_<?php echo $ident; ?> ').val() == "repeatAll") { jQuery('#global_body_<?php echo $ident; ?> .playNext_<?php echo $ident; ?> ').click(); } if (jQuery('#repeat_<?php echo $ident; ?> ').val() == "repeatOff") { if (vid_num_<?php echo $ident; ?> == video_urls_<?php echo $ident; ?> .length - 1) { el[0].currentTime = 0; el[0].pause(); paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } } <?php if ($theme->autoNext == 1) { ?> if (jQuery('#repeat_<?php echo $ident; ?> ').val() == "repeatOff") if (vid_num_<?php echo $ident; ?> == video_urls_<?php echo $ident; ?> .length - 1) { el[0].currentTime = 0; el[0].pause(); paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } else { jQuery('#global_body_<?php echo $ident; ?> .playNext_<?php echo $ident; ?> ').click(); } <?php } ?> }); } var timeDrag_<?php echo $ident; ?> = false; /* Drag status */ jQuery('#global_body_<?php echo $ident; ?> .progressBar_<?php echo $ident; ?> ').mousedown(function (e) { timeDrag_<?php echo $ident; ?> = true; updatebar_<?php echo $ident; ?> (e.pageX); }); jQuery('#global_body_<?php echo $ident; ?> .progressBar_<?php echo $ident; ?> ').select(function () { }) jQuery(document).mouseup(function (e) { if (timeDrag_<?php echo $ident; ?> ) { timeDrag_<?php echo $ident; ?> = false; updatebar_<?php echo $ident; ?> (e.pageX); } }); jQuery(document).mousemove(function (e) { if (timeDrag_<?php echo $ident; ?> ) { updatebar_<?php echo $ident; ?> (e.pageX); } }); var updatebar_<?php echo $ident; ?> = function (x) { var progress_<?php echo $ident; ?> = jQuery('#global_body_<?php echo $ident; ?> .progressBar_<?php echo $ident; ?> '); var maxduration_<?php echo $ident; ?> = video_<?php echo $ident; ?> [0].duration; //Video duraiton var position_<?php echo $ident; ?> = x - progress_<?php echo $ident; ?> .offset().left; //Click pos var percentage_<?php echo $ident; ?> = 100 * position_<?php echo $ident; ?> / progress_<?php echo $ident; ?> .width(); if (percentage_<?php echo $ident; ?> > 100) { percentage_<?php echo $ident; ?> = 100; } if (percentage_<?php echo $ident; ?> < 0) { percentage_<?php echo $ident; ?> = 0; } jQuery('#global_body_<?php echo $ident; ?> .timeBar_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); jQuery('.spanA').css('left', position_<?php echo $ident; ?> + 'px'); video_<?php echo $ident; ?> [0].currentTime = maxduration_<?php echo $ident; ?> * percentage_<?php echo $ident; ?> / 100; }; function startBuffer_<?php echo $ident; ?> () { setTimeout(function () { var maxduration_<?php echo $ident; ?> = video_<?php echo $ident; ?> [0].duration; try{ var currentBuffer_<?php echo $ident; ?> = video_<?php echo $ident; ?> [0].buffered.end(0); }catch(err){ setTimeout(startBuffer_<?php echo $ident; ?> , 500); return false; } var percentage_<?php echo $ident; ?> = 100 * currentBuffer_<?php echo $ident; ?> / maxduration_<?php echo $ident; ?> ; jQuery('#global_body_<?php echo $ident; ?> .bufferBar_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); if (currentBuffer_<?php echo $ident; ?> < maxduration_<?php echo $ident; ?> ) { setTimeout(startBuffer_<?php echo $ident; ?> , 500); } }, 800) } ; checkVideoLoad = setInterval(function () { if (video_<?php echo $ident; ?> [0].duration) { setTimeout(startBuffer_<?php echo $ident; ?> (), 500); clearInterval(checkVideoLoad) } }, 1000) var volume_<?php echo $ident; ?> = jQuery('#global_body_<?php echo $ident; ?> .volumeBar_<?php echo $ident; ?> '); jQuery('#global_body_<?php echo $ident; ?> .muted').click(function () { video_<?php echo $ident; ?> [0].muted = !video_<?php echo $ident; ?> [0].muted; return false; }); jQuery('#global_body_<?php echo $ident; ?> .volumeBar_<?php echo $ident; ?> ').on('mousedown', function (e) { var position_<?php echo $ident; ?> = e.pageX - volume_<?php echo $ident; ?> .offset().left; var percentage_<?php echo $ident; ?> = 100 * position_<?php echo $ident; ?> / volume_<?php echo $ident; ?> .width(); jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); video_<?php echo $ident; ?> [0].volume = percentage_<?php echo $ident; ?> / 100; }); var volumeDrag_<?php echo $ident; ?> = false; /* Drag status */ jQuery('#global_body_<?php echo $ident; ?> .volumeBar_<?php echo $ident; ?> ').mousedown(function (e) { volumeDrag_<?php echo $ident; ?> = true; updateVolumeBar_<?php echo $ident; ?> (e.pageX); }); jQuery(document).mouseup(function (e) { if (volumeDrag_<?php echo $ident; ?> ) { volumeDrag_<?php echo $ident; ?> = false; updateVolumeBar_<?php echo $ident; ?> (e.pageX); } }); jQuery(document).mousemove(function (e) { if (volumeDrag_<?php echo $ident; ?> ) { updateVolumeBar_<?php echo $ident; ?> (e.pageX); } }); var updateVolumeBar_<?php echo $ident; ?> = function (x) { var progress_<?php echo $ident; ?> = jQuery('#global_body_<?php echo $ident; ?> .volumeBar_<?php echo $ident; ?> '); var position_<?php echo $ident; ?> = x - progress_<?php echo $ident; ?> .offset().left; //Click pos var percentage_<?php echo $ident; ?> = 100 * position_<?php echo $ident; ?> / progress_<?php echo $ident; ?> .width(); if (percentage_<?php echo $ident; ?> > 100) { percentage_<?php echo $ident; ?> = 100; } if (percentage_<?php echo $ident; ?> < 0) { percentage_<?php echo $ident; ?> = 0; } jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); video_<?php echo $ident; ?> [0].volume = percentage_<?php echo $ident; ?> / 100; }; var yy = 1; controlHideTime_<?php echo $ident; ?> = ''; jQuery("#global_body_<?php echo $ident; ?> ").each(function () { jQuery(this).mouseleave(function () { controlHideTime_<?php echo $ident; ?> = setInterval(function () { yy = yy + 1; if (yy <<?php echo $theme->autohideTime; ?> ) { return false; } else { if(is_youtube_video_<?php echo $ident; ?> ()){ clearInterval(controlHideTime_<?php echo $ident; ?> ); yy = 1; return false; } clearInterval(controlHideTime_<?php echo $ident; ?> ); yy = 1; jQuery("#event_type_<?php echo $ident; ?> ").val('mouseleave'); <?php if ($theme->playlistAutoHide == 1) { ?> jQuery("#play_list_<?php echo $ident; ?> ").animate({ width: "0px", }, 300); setTimeout(function () { jQuery("#play_list_<?php echo $ident; ?> ").css('display', 'none'); }, 300) jQuery("#global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", <?php if ($theme->playlistPos == 1) { ?> marginLeft: '0px' <?php } else { ?> marginRight: '0px' <?php } ?> }, 300); jQuery("#global_body_<?php echo $ident; ?> #control_btns_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", }, 300); /*jQuery("#space").animate({ paddingLeft: <?php echo $theme->appWidth * 20 / 100; ?> +"px"},300)*/ <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 1) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", marginLeft: '0px' }, 300); <?php } ?> <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 2) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", }, 300); <?php } ?> <?php if ($theme->ctrlsSlideOut == 1) { ?> jQuery('.control').hide("slide", { direction: "<?php if ($theme->ctrlsPos == 1) { echo 'up'; } else { echo 'down'; } ?> " }, 1000); <?php } ?> <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 1) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", marginLeft: '0px' }, 300); <?php } ?> <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 2) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", }, 300); <?php } ?> <?php } ?> <?php if ($theme->ctrlsSlideOut == 1) { ?> jQuery('#global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> ').hide("slide", { direction: "<?php if ($theme->ctrlsPos == 1) { echo 'up'; } else { echo 'down'; } ?> ", queue: false }, 1000); <?php } ?> } }, 1000); }); jQuery(this).mouseenter(function () { if (controlHideTime_<?php echo $ident; ?> ) { clearInterval(controlHideTime_<?php echo $ident; ?> ); yy = 1; } if (document.getElementById('control_<?php echo $ident; ?> ').style.display == "none") { jQuery('#global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> ').show("slide", { direction: "<?php if ($theme->ctrlsPos == 1) { echo 'up'; } else { echo 'down'; } ?> " }, 450); } }) }); var xx = 1; volumeHideTime_<?php echo $ident; ?> = ''; jQuery("#volumeTD_<?php echo $ident; ?> ").each(function () { jQuery('#volumeTD_<?php echo $ident; ?> ').mouseleave(function () { volumeHideTime_<?php echo $ident; ?> = setInterval(function () { xx = xx + 1; if (xx < 2) { return false } else { clearInterval(volumeHideTime_<?php echo $ident; ?> ); xx = 1; jQuery("#global_body_<?php echo $ident; ?> #space").animate({ paddingLeft:<?php echo $theme->appWidth * 20 / 100 + 'px'; ?> , }, 1000); jQuery("#global_body_<?php echo $ident; ?> #volumebar_player_<?php echo $ident; ?> ").animate({ width: '0px', }, 1000); percentage_<?php echo $ident; ?> = video_<?php echo $ident; ?> [0].volume * 100; jQuery('#global_body_<?php echo $ident; ?> .volume_<?php echo $ident; ?> ').css('width', percentage_<?php echo $ident; ?> + '%'); } }, 1000) }) jQuery('#volumeTD_<?php echo $ident; ?> ').mouseenter(function () { if (volumeHideTime_<?php echo $ident; ?> ) { clearInterval(volumeHideTime_<?php echo $ident; ?> ) xx = 1; } jQuery("#global_body_<?php echo $ident; ?> #space").animate({ paddingLeft:<?php echo $theme->appWidth * 20 / 100 - 100 + 'px'; ?> , }, 500); jQuery("#global_body_<?php echo $ident; ?> #volumebar_player_<?php echo $ident; ?> ").animate({ <?php if ($theme->appWidth > 400) { ?> width: '100px', <?php } else { ?> width: '50px', <?php } ?> }, 500); }); }) function show_hide_playlist() { if (document.getElementById("play_list_<?php echo $ident; ?> ").style.width == "0px") { jQuery("#play_list_<?php echo $ident; ?> ").css('display', '') jQuery("#play_list_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->playlistWidth; ?> +"px", }, 500); if(!is_youtube_video_<?php echo $ident; ?> ()){ jQuery("#global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth - $theme->playlistWidth; ?> +"px", <?php if ($theme->playlistPos == 1) { ?> marginLeft: <?php echo $theme->playlistWidth; ?> +'px' <?php } else { ?> marginRight: <?php echo $theme->playlistWidth; ?> +'px' <?php } ?> }, 500); /*jQuery("#space").animate({paddingLeft: <?php echo $theme->appWidth * 20 / 100 - $theme->playlistWidth; ?> +"px"},500)*/ jQuery("#global_body_<?php echo $ident; ?> #control_btns_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth - $theme->playlistWidth; ?> +"px", }, 500); <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 1) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth - $theme->playlistWidth; ?> +'px', marginLeft: <?php echo $theme->playlistWidth; ?> +'px' }, 500); <?php } ?> <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 2) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth - $theme->playlistWidth; ?> +"px", }, 500); <?php } ?> } } else { jQuery("#global_body_<?php echo $ident; ?> #play_list_<?php echo $ident; ?> ").animate({ width: "0px", }, 1500); setTimeout(function () { jQuery("#play_list_<?php echo $ident; ?> ").css('display', 'none'); }, 1500) if(!is_youtube_video_<?php echo $ident; ?> ()){ jQuery("#global_body_<?php echo $ident; ?> .control_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", <?php if ($theme->playlistPos == 1) { ?> marginLeft: '0px' <?php } else { ?> marginRight: '0px' <?php } ?> }, 1500); jQuery("#global_body_<?php echo $ident; ?> #control_btns_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", }, 1500); /*jQuery("#space").animate({paddingLeft: <?php echo $theme->appWidth * 20 / 100; ?> +'px'},1500)*/ <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 1) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", marginLeft: '0px' }, 1500); <?php } ?> <?php if ($theme->playlistOverVid == 0 && $theme->playlistPos == 2) { ?> jQuery("#videoID_<?php echo $ident; ?> ").animate({ width: <?php echo $theme->appWidth; ?> +"px", }, 1500); <?php } ?> } } } jQuery('#global_body_<?php echo $ident; ?> .playlist_<?php echo $ident; ?> ').on('click', show_hide_playlist); current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; video_urls_<?php echo $ident; ?> = jQuery('#track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).find('.vid_thumb_<?php echo $ident; ?> '); function current_playlist_videos_<?php echo $ident; ?> () { current_playlist_table_<?php echo $ident; ?> = document.getElementById('current_playlist_table_<?php echo $ident; ?> ').value; video_urls_<?php echo $ident; ?> = jQuery('#track_list_<?php echo $ident; ?> _' + current_playlist_table_<?php echo $ident; ?> ).find('.vid_thumb_<?php echo $ident; ?> '); } function in_array(needle, haystack, strict) { // Checks if a value exists in an array // // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) var found = false, key, strict = !!strict; for (key in haystack) { if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) { found = true; break; } } return found; } var vid_num_<?php echo $ident; ?> = 0; //for set cur video number var used_track_<?php echo $ident; ?> = new Array(); // played vido numbers jQuery('#global_body_<?php echo $ident; ?> .playPrev_<?php echo $ident; ?> ').on('click', function () { next_vid_<?php echo $ident; ?> = true; used_track_<?php echo $ident; ?> [used_track_<?php echo $ident; ?> .length] = vid_num_<?php echo $ident; ?> ; vid_num_<?php echo $ident; ?> --; if (used_track_<?php echo $ident; ?> .length >= video_urls_<?php echo $ident; ?> .length) { // reset old list used_track_<?php echo $ident; ?> = []; if (jQuery('#shuffle_<?php echo $ident; ?> ').val() == 1) { // get new vido number out of used_tracks vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); while (in_array(vid_num_<?php echo $ident; ?> , used_track_<?php echo $ident; ?> )) { vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); } } } if (jQuery('#shuffle_<?php echo $ident; ?> ').val() == 1) { // get new vido number out of used_tracks vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); while (in_array(vid_num_<?php echo $ident; ?> , used_track_<?php echo $ident; ?> )) { vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); } } if (vid_num_<?php echo $ident; ?> < 0) { vid_num_<?php echo $ident; ?> = video_urls_<?php echo $ident; ?> .length - 1; } video_urls_<?php echo $ident; ?> [vid_num_<?php echo $ident; ?> ].click(); }); jQuery('#global_body_<?php echo $ident; ?> .playNext_<?php echo $ident; ?> ').on('click', function () { next_vid_<?php echo $ident; ?> = true; used_track_<?php echo $ident; ?> [used_track_<?php echo $ident; ?> .length] = vid_num_<?php echo $ident; ?> ; vid_num_<?php echo $ident; ?> ++; if (used_track_<?php echo $ident; ?> .length >= video_urls_<?php echo $ident; ?> .length) { // reset old list used_track_<?php echo $ident; ?> = []; if (jQuery('#shuffle_<?php echo $ident; ?> ').val() == 1) { // get new vido number out of used_tracks vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); while (in_array(vid_num_<?php echo $ident; ?> , used_track_<?php echo $ident; ?> )) { vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); } } } if (jQuery('#shuffle_<?php echo $ident; ?> ').val() == 1) { // get new vido number out of used_tracks vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); while (in_array(vid_num_<?php echo $ident; ?> , used_track_<?php echo $ident; ?> )) { vid_num_<?php echo $ident; ?> = parseInt(Math.random() * (video_urls_<?php echo $ident; ?> .length - 0) + 0); } } jQuery('#global_body_<?php echo $ident; ?> .timeBar_<?php echo $ident; ?> ').css('width', '0%'); if (vid_num_<?php echo $ident; ?> == video_urls_<?php echo $ident; ?> .length) { vid_num_<?php echo $ident; ?> = 0; } video_urls_<?php echo $ident; ?> [vid_num_<?php echo $ident; ?> ].click(); }); jQuery(".lib_<?php echo $ident; ?> ").click(function () { jQuery('#album_div_<?php echo $ident; ?> ').css('transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').transition({ perspective: '700px', rotateY: '180deg', }, 1000); setTimeout(function () { jQuery('#album_div_<?php echo $ident; ?> ').css('-ms-transform', 'rotateY(180deg)') jQuery('#album_div_<?php echo $ident; ?> ').css('transform', 'rotateY(180deg)') jQuery('#album_div_<?php echo $ident; ?> ').css('-o-transform', 'rotateY(180deg)') document.getElementById('album_div_<?php echo $ident; ?> ').style.display = 'block' document.getElementById('video_div_<?php echo $ident; ?> ').style.display = 'none' }, 300); setTimeout(function () { jQuery('#album_div_<?php echo $ident; ?> ').css('-ms-transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('-ms-transform', ''); jQuery('#album_div_<?php echo $ident; ?> ').css('transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('transform', ''); jQuery('#album_div_<?php echo $ident; ?> ').css('-o-transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('-o-transform', ''); }, 1100); }) jQuery(".show_vid_<?php echo $ident; ?> ").click(function () { jQuery('#global_body_<?php echo $ident; ?> ').transition({ perspective: '700px', rotateY: '180deg', }, 1000); setTimeout(function () { jQuery('#video_div_<?php echo $ident; ?> ').css('-ms-transform', 'rotateY(180deg)') jQuery('#video_div_<?php echo $ident; ?> ').css('transform', 'rotateY(180deg)') jQuery('#video_div_<?php echo $ident; ?> ').css('-o-transform', 'rotateY(180deg)') document.getElementById('album_div_<?php echo $ident; ?> ').style.display = 'none' document.getElementById('video_div_<?php echo $ident; ?> ').style.display = 'block' }, 300); setTimeout(function () { jQuery('#video_div_<?php echo $ident; ?> ').css('-ms-transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('-ms-transform', ''); jQuery('#video_div_<?php echo $ident; ?> ').css('transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('transform', ''); jQuery('#video_div_<?php echo $ident; ?> ').css('-o-transform', ''); jQuery('#global_body_<?php echo $ident; ?> ').css('-o-transform', ''); }, 1100); }) var canvas_<?php echo $ident; ?> = [] var ctx_<?php echo $ident; ?> = [] var originalPixels_<?php echo $ident; ?> = [] var currentPixels_<?php echo $ident; ?> = [] for (i = 1; i < 30; i++) if (document.getElementById('button' + i + '_<?php echo $ident; ?> ')) { canvas_<?php echo $ident; ?> [i] = document.createElement("canvas"); ctx_<?php echo $ident; ?> [i] = canvas_<?php echo $ident; ?> [i].getContext("2d"); originalPixels_<?php echo $ident; ?> [i] = null; currentPixels_<?php echo $ident; ?> [i] = null; } function getPixels_<?php echo $ident; ?> () { for (i = 1; i < 30; i++) if (document.getElementById('button' + i + '_<?php echo $ident; ?> ')) { img = document.getElementById('button' + i + '_<?php echo $ident; ?> '); canvas_<?php echo $ident; ?> [i].width = img.width; canvas_<?php echo $ident; ?> [i].height = img.height; ctx_<?php echo $ident; ?> [i].drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, img.width, img.height); originalPixels_<?php echo $ident; ?> [i] = ctx_<?php echo $ident; ?> [i].getImageData(0, 0, img.width, img.height); currentPixels_<?php echo $ident; ?> [i] = ctx_<?php echo $ident; ?> [i].getImageData(0, 0, img.width, img.height); img.onload = null; } } function HexToRGB_<?php echo $ident; ?> (Hex) { var Long = parseInt(Hex.replace(/^#/, ""), 16); return { R: (Long >>> 16) & 0xff, G: (Long >>> 8) & 0xff, B: Long & 0xff }; } function changeColor_<?php echo $ident; ?> () { for (i = 1; i < 30; i++) if (document.getElementById('button' + i + '_<?php echo $ident; ?> ')) { if (!originalPixels_<?php echo $ident; ?> [i]) return; // Check if image has loaded var newColor = HexToRGB_<?php echo $ident; ?> (document.getElementById("color_<?php echo $ident; ?> ").value); for (var I = 0, L = originalPixels_<?php echo $ident; ?> [i].data.length; I < L; I += 4) { if (currentPixels_<?php echo $ident; ?> [i].data[I + 3] > 0) { currentPixels_<?php echo $ident; ?> [i].data[I] = originalPixels_<?php echo $ident; ?> [i].data[I] / 255 * newColor.R; currentPixels_<?php echo $ident; ?> [i].data[I + 1] = originalPixels_<?php echo $ident; ?> [i].data[I + 1] / 255 * newColor.G; currentPixels_<?php echo $ident; ?> [i].data[I + 2] = originalPixels_<?php echo $ident; ?> [i].data[I + 2] / 255 * newColor.B; } } ctx_<?php echo $ident; ?> [i].putImageData(currentPixels_<?php echo $ident; ?> [i], 0, 0); img = document.getElementById('button' + i + '_<?php echo $ident; ?> '); img.src = canvas_<?php echo $ident; ?> [i].toDataURL("image/png"); } } <?php if ($theme->spaceOnVid == 1) { ?> var video_focus; jQuery('#global_body_<?php echo $ident; ?> ,#videoID_<?php echo $ident; ?> ').each(function () { jQuery(this).live('click', function () { setTimeout("video_focus=1", 100) }) }) jQuery('body').live('click', function () { video_focus = 0 }) jQuery(window).keypress(function (event) { if(!is_youtube_video_<?php echo $ident; ?> ()){ if (video_<?php echo $ident; ?> [0].paused) { video_<?php echo $ident; ?> [0].play(); paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); } else { video_<?php echo $ident; ?> [0].pause(); paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } }else{ if(!check_play_<?php echo $ident; ?> ){ if(typeof player_<?php echo $ident; ?> != 'undefined'){if(youtube_ready_<?php echo $ident; ?> )player_<?php echo $ident; ?> .playVideo();} check_play_<?php echo $ident; ?> = true; paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); }else{ if(typeof player_<?php echo $ident; ?> != 'undefined')player_<?php echo $ident; ?> .pauseVideo(); check_play_<?php echo $ident; ?> = false; paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } } return false; }); <?php } ?> function vidOnSpace_<?php echo $ident; ?> () { if (video_<?php echo $ident; ?> [0].paused) { video_<?php echo $ident; ?> [0].play(); paly_<?php echo $ident; ?> .css('display', "none"); pause_<?php echo $ident; ?> .css('display', ""); } else { video_<?php echo $ident; ?> [0].pause(); paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } } jQuery('#track_list_<?php echo $ident; ?> _0').find('#thumb_0_<?php echo $ident; ?> ').click(); if(!is_youtube_video_<?php echo $ident; ?> ()) video_<?php echo $ident; ?> [0].pause(); else if(typeof player_<?php echo $ident; ?> != 'undefined')player_<?php echo $ident; ?> .pauseVideo(); if (paly_<?php echo $ident; ?> && pause_<?php echo $ident; ?> ) { paly_<?php echo $ident; ?> .css('display', ""); pause_<?php echo $ident; ?> .css('display', "none"); } <?php if ($AlbumId != '') { ?> jQuery('#track_list_<?php echo $ident; ?> _<?php echo $AlbumId; ?> ').find('#thumb_<?php echo $TrackId; ?> _<?php echo $ident; ?> ').click(); <?php } ?> jQuery(window).load(function () { getPixels_<?php echo $ident; ?> (); changeColor_<?php echo $ident; ?> () }) jQuery('.volume_<?php echo $ident; ?> ')[0].style.width = '<?php echo $theme->defaultVol; ?> %'; video_<?php echo $ident; ?> [0].volume =<?php echo $theme->defaultVol / 100; ?> ; </script> <?php if ($theme->openPlaylistAtStart) { echo "<script>jQuery(ifrae(show_hide_playlist);</script>"; } } ?> </div><br/> <?php global $many_players; $many_players++; $ident++; $content = ob_get_contents(); ob_end_clean(); return $content; }
function TimeFromTo($desc, $name_from, $name_to, $name_from_val, $name_to_val, $not_avail_name = "", $not_avail_name_checked = "") { $this->form .= "<tr>\n"; $this->form .= "<td valign='top'>" . $desc . "</td>\n"; $this->form .= "<td>"; /* $this->form.="<input type='text name='".$name_from."' value='".$name_from_val."' size='6' class='inputstyle'>\n"; $this->form.=JCalendarTime($name_from,$name_from); $this->form.="<input type='text name='".$name_to."' value='".$name_to_val."' size='6' class='inputstyle'>\n"; $this->form.=JCalendarTime($name_to,$name_to); */ /* TRIM THE SELECTED VALUES TO THE FIRST 5 CHARACTERS FOR HOUR AND MINUTE ONLY */ $name_from_val = SUBSTR($name_from_val, 0, 5); $name_to_val = SUBSTR($name_to_val, 0, 5); $this->form .= "<select name='" . $name_from . "' class='inputstyle'>\n"; for ($i = 0; $i < 24; $i++) { for ($j = 0; $j < 46; $j) { if ($i == 0) { $i_show = "00"; } else { if ($i < 10) { $i_show = "0" . $i; } else { $i_show = $i; } } if ($j == 0) { $j_show = "00"; } else { $j_show = $j; } $friendly_val = $i_show . ":" . $j_show; //echo $friendly_val." versus ".$name_from_val."<br>"; if ($friendly_val == $name_from_val) { $selected = "selected"; } else { $selected = ""; } $this->form .= "<option value='" . $friendly_val . ":00' " . $selected . ">" . $friendly_val . "</option>\n"; $j += 15; } } $this->form .= "</select>\n"; $this->form .= " to \n"; $this->form .= "<select name='" . $name_to . "' class='inputstyle'>\n"; for ($i = 0; $i < 24; $i++) { for ($j = 0; $j < 46; $j) { if ($i == 0) { $i_show = "00"; } else { if ($i < 10) { $i_show = "0" . $i; } else { $i_show = $i; } } if ($j == 0) { $j_show = "00"; } else { $j_show = $j; } $friendly_val = $i_show . ":" . $j_show; //echo $friendly_val." versus ".$name_from_val."<br>"; if ($friendly_val === $name_to_val) { $selected = "selected"; } else { $selected = ""; } $this->form .= "<option value='" . $friendly_val . ":00' " . $selected . ">" . $friendly_val . "</option>\n"; $j += 15; } } $this->form .= "</select>\n"; if (!empty($not_avail_name)) { if ($not_avail_name_checked) { $checked = "checked"; } else { $checked = ""; } $this->form .= " Not available: <input type='checkbox' name='" . $not_avail_name . "' value='y' class='inputstyle' " . $checked . ">\n"; } $this->form .= "</td>\n"; $this->form .= "</tr>\n"; }
/** * Short description. */ public function cut($str, $from, $to, $direct = 'out') { //echo "$str n $from n $to n"; //$from = """; $to = """; $frompos = STRPOS($str, $from); $topos = STRPOS($str, $to, $frompos + STRLEN($from)); if ($direct == 'in') { $start = $frompos + STRLEN($from); $end = $topos - $start; $txt = SUBSTR($str, $start, $end); } else { $start = $frompos; $end = $topos + STRLEN($to) - $frompos; $txt = SUBSTR($str, $start, $end); } return $txt; }
function listar_directorios_ruta($ruta, $esp, $preR) { //Se comrpueba si es un directorio if (is_dir($ruta)) { //Funcion opendir() que crea un objeto directorio if ($dh = opendir($ruta)) { $esp = $esp . " "; //Como entramos dentro de un directorio nuevo, los elementos listados estaran un poco mas a la derecha //Manera rapida de recorrer los elementos contenidos en el objeto directorio creado anteriormente while (($file = readdir($dh)) !== false) { // cada elemento comprobamos si es .PHP o .HTML y si es asi lo mostramos if (strtoupper(explode(".", $file)[count(explode(".", $file)) - 1]) == "PHP" || strtoupper(explode(".", $file)[count(explode(".", $file)) - 1]) == "HTML") { echo "<br><a href=\"#\" style=\"font-size:bold;color:red;\" onClick=\"document.getElementById('PageList').value='" . $preR . $file . "';\"> " . $esp . "-{$file}</a>"; } } closedir($dh); // Se cierra el objeto directorio, cierra el flujo de lectura sobre el directorio en cuestion } //Una vez leidos los ficheros del directorio, repetimos el proceso para los directorios contenidos if ($dh = opendir($ruta)) { //Recorremos el directorio otravez while (($file = readdir($dh)) !== false) { // Se saltan los directorios Actual y Padre que por defecto lista tambien como elementos del directorio if (is_dir($ruta . $file) && $file != "." && $file != "..") { //No se listan los ficheros de Gestapp ya que no se realizan pruebas sobre ellos (A saber k sale de ahi) if (strpos($file, 'GESTAPP') === false) { //Se muestra el mensaje de que es un directorio y se llama a esta misma funcion otra vez recursivamente para listar // los elementos del subdirectorio echo "<br>" . $esp . "Directorio: " . SUBSTR($ruta . $file, strpos($ruta . $file, "/../") + 9) . ""; listar_directorios_ruta($ruta . $file . "/", $esp, $preR . $file . "/"); } } } closedir($dh); } } else { echo "<br>No es ruta valida"; } }
public function ImportarRegistro($Row) { $resultado = new ResultadoLote(); //$resultado->Registros[] = $Row; if ($Row['INDIVIDUO_TIPO'] != 'PE' && $Row['INDIVIDUO_TIPO'] != 'PJ' && $Row['INDIVIDUO_TIPO'] != 'EN' && $Row['INDIVIDUO_TIPO'] != 'OT') { $resultado->RegistrosIgnorados++; return $resultado; } if ($Row['NOMBRE_IND'] != 'NRO.DE CUENTA CEMENTERIO' || $Row['NOMBRE_IND'] != 'NN' || SUBSTR($Row['NOMBRE_IND'], 0, 3) != '???') { $resultado->RegistrosIgnorados++; return $resultado; } if ((int) $Row['TRIBUTARIA_ID'] > 0 || (int) $Row['TRIBUTARIA_ID'] <= 9999) { $resultado->RegistrosIgnorados++; return $resultado; } $Documento = StringHelper::ObtenerDocumento($Row['TRIBUTARIA_ID']); $Apellido = StringHelper::Desoraclizar($Row['APELLIDOS']); $Nombre = StringHelper::Desoraclizar($Row['NOMBRES']); $RazonSocial = StringHelper::Desoraclizar($Row['RAZON_SOCIAL']); if (!$Nombre && !$Apellido && !$RazonSocial) { $resultado->RegistrosIgnorados++; return $resultado; } // echo ($Nombre .'/'. $Apellido .'/'. $RazonSocial); // echo "\n"; $Row['TG06100_ID'] = (int) $Row['TG06100_ID']; $entity = $this->em->getRepository('YacareBaseBundle:Persona')->findOneBy(array('Tg06100Id' => $Row['TG06100_ID'])); $Cuilt = ''; if ($Documento[0] == 'CUIL' || $Documento[0] == 'CUIT') { $Cuilt = str_replace('-', '', $Documento[1]); } if ($Documento[0] == 'CUIL') { // Intento obtener el DNI del CUIL $Partes = explode('-', $Documento[1]); if (count($Partes) == 3) { $Documento[0] = 'DNI'; $Documento[1] = (int) $Partes[1]; } } if ($entity == null && $Cuilt) { $entity = $this->em->getRepository('YacareBaseBundle:Persona')->findOneBy(array('Cuilt' => $Cuilt)); } if ($entity == null) { $entity = $this->em->getRepository('YacareBaseBundle:Persona')->findOneBy(array('DocumentoNumero' => $Documento[1])); } if ($entity == null) { $entity = new \Yacare\BaseBundle\Entity\Persona(); if ($Row['TIPO_SOCIEDAD']) { switch ($Row['TIPO_SOCIEDAD']) { case 'SA': $entity->setTipoSociedad(1); break; case 'SRL': $entity->setTipoSociedad(8); break; case 'SC': $entity->setTipoSociedad(2); break; case 'SCA': $entity->setTipoSociedad(4); break; case 'SH': $entity->setTipoSociedad(3); break; case 'SD': if (strpos($RazonSocial, 'S.A.') !== false || strpos($RazonSocial, ' SA') !== false) { $entity->setTipoSociedad(1); } elseif (strpos($RazonSocial, 'S.R.L.') !== false || strpos($RazonSocial, ' SRL') !== false) { $entity->setTipoSociedad(8); } elseif (strpos($RazonSocial, 'S/H') !== false || strpos($RazonSocial, ' S.DE H.') !== false || strpos($RazonSocial, ' S. DE H.') !== false || strpos($RazonSocial, ' S.H') !== false) { $entity->setTipoSociedad(3); } break; } } elseif ($Row['INDIVIDUO_TIPO'] != 'EN') { $entity->setTipoSociedad(11); } if ($Documento[0] == 'CUIL' && (substr($Documento[1], 0, 3) == '30-' || substr($Documento[1], 0, 3) == '33-' || substr($Documento[1], 0, 3) == '34-')) { $Documento[0] = 'CUIT'; } if (!$entity->getCuilt() && $Cuilt) { $entity->setCuilt($Cuilt); } if (!$entity->getDocumentoNumero()) { $entity->setDocumentoNumero($Documento[1]); } if (!$entity->getDocumentoTipo()) { $entity->setDocumentoTipo(1); } if (!$entity->getNombre()) { $entity->setNombre($Nombre); } if (!$entity->getApellido()) { $entity->setApellido($Apellido); } if (!$entity->getRazonSocial()) { $entity->setRazonSocial($RazonSocial); } if (!$entity->getDomicilioCodigoPostal()) { $entity->setDomicilioCodigoPostal('9420'); } $CodigoCalle = $this->ArreglarCodigoCalle($Row['CODIGO_CALLE']); if ($CodigoCalle && !$entity->getDomicilioCalle()) { $Calle = $this->em->find('YacareCatastroBundle:Calle', $CodigoCalle); if ($Calle) { $entity->setDomicilioCalle($Calle); } } if (!$entity->getDomicilioCalleNombre()) { $entity->setDomicilioCalleNombre(StringHelper::Desoraclizar($Row['CALLE'])); } if (!$entity->getDomicilioNumero()) { $entity->setDomicilioNumero($Row['NUMERO']); } if (!$entity->getDomicilioPiso()) { $entity->setDomicilioPiso($Row['PISO']); } if (!$entity->getDomicilioPuerta()) { $entity->setDomicilioPuerta($Row['DEPTO']); } // Si no está en el grupo Contribuyentes, lo agrego // if ($entity->getGrupos()->contains($this->GrupoContribuyentes) == false) { // $entity->getGrupos()->add($this->GrupoContribuyentes); // } if ($Row['SEXO'] == 'F') { $entity->setGenero(2); } elseif ($Row['SEXO'] == 'M') { $entity->setGenero(1); } $entity->setTg06100Id($Row['TG06100_ID']); $resultado->RegistrosNuevos++; } else { $resultado->RegistrosActualizados++; } $entity->getNombreVisible(); $this->em->persist($entity); $this->em->flush(); return $resultado; }
array_push($wyniki, $row); } shuffle($wyniki); if (count($wyniki) > 0) { $i = 0; foreach ($wyniki as $r) { if ($i < 8) { $i++; $rand = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); $color = '#' . $rand[rand(0, 15)] . $rand[rand(0, 15)] . $rand[rand(0, 15)] . $rand[rand(0, 15)] . $rand[rand(0, 15)] . $rand[rand(0, 15)]; $hashlesscolor = STR_REPLACE('#', NULL, $color); $rr = DECHEX(255 - HEXDEC(SUBSTR($hashlesscolor, 0, 2))); $rr = STRLEN($rr) > 1 ? $rr : '0' . $rr; $gg = DECHEX(255 - HEXDEC(SUBSTR($hashlesscolor, 2, 2))); $gg = STRLEN($gg) > 1 ? $gg : '0' . $gg; $bb = DECHEX(255 - HEXDEC(SUBSTR($hashlesscolor, 4, 2))); $bb = STRLEN($bb) > 1 ? $bb : '0' . $bb; $invcolor = '#' . $rr . $gg . $bb; echo "<div class=\"col-md-3 col-centered\"style=\"text-align:center;padding: 2.5% 2.5% 2.5% 2.5%;\">"; echo "<div class=\"circle\" style=\"text-shadow: -1px 0 #444444, 0 1px #444444, 1px 0 #444444, 0 -1px #444444; border: 1px solid black;color:" . $invcolor . "; background-color:" . $color . "\">"; echo "<a href=\"sesja.php?sesja=" . $r['id_sesji'] . "\">"; echo "<h2>" . $r['lokalizacja'] . "</h2>"; echo "<p>" . $r['data'] . "</p>"; echo "</a>"; echo "</div>"; echo "</div>"; } else { break; } } } else {
/** * Verifies authentication response from OpenID server. * * This is the second step of OpenID authentication process. * The function returns true on successful authentication and false on * failure. * * @param array $params HTTP query data from OpenID server * @param string &$identity this argument is set to end-user's claimed * identifier or OpenID provider local identifier. * @param mixed $extensions extension object or array of extensions objects * @return bool */ public function verify($params, &$identity = "", $extensions = null) { $this->_setError(''); $version = 1.1; if (isset($params['openid_ns']) && $params['openid_ns'] == Zend_OpenId::NS_2_0) { $version = 2.0; } if (isset($params["openid_claimed_id"])) { $identity = $params["openid_claimed_id"]; } else { if (isset($params["openid_identity"])) { $identity = $params["openid_identity"]; } else { $identity = ""; } } if ($version < 2.0 && !isset($params["openid_claimed_id"])) { if ($this->_session !== null) { if ($this->_session->identity === $identity) { $identity = $this->_session->claimed_id; } } else { if (defined('SID')) { if (isset($_SESSION["zend_openid"]["identity"]) && isset($_SESSION["zend_openid"]["claimed_id"]) && $_SESSION["zend_openid"]["identity"] === $identity) { $identity = $_SESSION["zend_openid"]["claimed_id"]; } } else { require_once "Zend/Session/Namespace.php"; $this->_session = new Zend_Session_Namespace("zend_openid"); if ($this->_session->identity === $identity) { $identity = $this->_session->claimed_id; } } } } if (empty($params['openid_mode'])) { $this->_setError("Missing openid.mode"); return false; } if (empty($params['openid_return_to'])) { $this->_setError("Missing openid.return_to"); return false; } if (empty($params['openid_signed'])) { $this->_setError("Missing openid.signed"); return false; } if (empty($params['openid_sig'])) { $this->_setError("Missing openid.sig"); return false; } if ($params['openid_mode'] != 'id_res') { $this->_setError("Wrong openid.mode '" . $params['openid_mode'] . "' != 'id_res'"); return false; } if (empty($params['openid_assoc_handle'])) { $this->_setError("Missing openid.assoc_handle"); return false; } if ($params['openid_return_to'] != Zend_OpenId::selfUrl()) { /* Ignore query part in openid.return_to */ $pos = strpos($params['openid_return_to'], '?'); if ($pos === false || SUBSTR($params['openid_return_to'], 0, $pos) != Zend_OpenId::selfUrl()) { $this->_setError("Wrong openid.return_to '" . $params['openid_return_to'] . "' != '" . Zend_OpenId::selfUrl() . "'"); return false; } } if ($version >= 2.0) { if (empty($params['openid_response_nonce'])) { $this->_setError("Missing openid.response_nonce"); return false; } if (empty($params['openid_op_endpoint'])) { $this->_setError("Missing openid.op_endpoint"); return false; /* OpenID 2.0 (11.3) Checking the Nonce */ } else { if (!$this->_storage->isUniqueNonce($params['openid_op_endpoint'], $params['openid_response_nonce'])) { $this->_setError("Duplicate openid.response_nonce"); return false; } } } if (!empty($params['openid_invalidate_handle'])) { if ($this->_storage->getAssociationByHandle($params['openid_invalidate_handle'], $url, $macFunc, $secret, $expires)) { $this->_storage->delAssociation($url); } } if ($this->_storage->getAssociationByHandle($params['openid_assoc_handle'], $url, $macFunc, $secret, $expires)) { // Security fix - check the association bewteen op_endpoint and assoc_handle if (isset($params['openid_op_endpoint']) && $url !== $params['openid_op_endpoint']) { $this->_setError("The op_endpoint URI is not the same of URI associated with the assoc_handle"); return false; } $signed = explode(',', $params['openid_signed']); // Check the parameters for the signature // @see https://openid.net/specs/openid-authentication-2_0.html#positive_assertions $toCheck = $this->_signParams; if (isset($params['openid_claimed_id']) && isset($params['openid_identity'])) { $toCheck = array_merge($toCheck, array('claimed_id', 'identity')); } foreach ($toCheck as $param) { if (!in_array($param, $signed, true)) { $this->_setError("The required parameter {$param} is missing in the signed"); return false; } } $data = ''; foreach ($signed as $key) { $data .= $key . ':' . $params['openid_' . strtr($key, '.', '_')] . "\n"; } if (base64_decode($params['openid_sig']) == Zend_OpenId::hashHmac($macFunc, $data, $secret)) { if (!Zend_OpenId_Extension::forAll($extensions, 'parseResponse', $params)) { $this->_setError("Extension::parseResponse failure"); return false; } /* OpenID 2.0 (11.2) Verifying Discovered Information */ if (isset($params['openid_claimed_id'])) { $id = $params['openid_claimed_id']; if (!Zend_OpenId::normalize($id)) { $this->_setError("Normalization failed"); return false; } else { if (!$this->_discovery($id, $discovered_server, $discovered_version)) { $this->_setError("Discovery failed: " . $this->getError()); return false; } else { if (!empty($params['openid_identity']) && $params["openid_identity"] != $id || !empty($params['openid_op_endpoint']) && $params['openid_op_endpoint'] != $discovered_server || $discovered_version != $version) { $this->_setError("Discovery information verification failed"); return false; } } } } return true; } $this->_storage->delAssociation($url); $this->_setError("Signature check failed"); return false; } else { /* Use dumb mode */ if (isset($params['openid_claimed_id'])) { $id = $params['openid_claimed_id']; } else { if (isset($params['openid_identity'])) { $id = $params['openid_identity']; } else { $this->_setError("Missing openid.claimed_id and openid.identity"); return false; } } if (!Zend_OpenId::normalize($id)) { $this->_setError("Normalization failed"); return false; } else { if (!$this->_discovery($id, $server, $discovered_version)) { $this->_setError("Discovery failed: " . $this->getError()); return false; } } /* OpenID 2.0 (11.2) Verifying Discovered Information */ if (isset($params['openid_identity']) && $params["openid_identity"] != $id || isset($params['openid_op_endpoint']) && $params['openid_op_endpoint'] != $server || $discovered_version != $version) { $this->_setError("Discovery information verification failed"); return false; } $params2 = array(); foreach ($params as $key => $val) { if (strpos($key, 'openid_ns_') === 0) { $key = 'openid.ns.' . substr($key, strlen('openid_ns_')); } else { if (strpos($key, 'openid_sreg_') === 0) { $key = 'openid.sreg.' . substr($key, strlen('openid_sreg_')); } else { if (strpos($key, 'openid_') === 0) { $key = 'openid.' . substr($key, strlen('openid_')); } } } $params2[$key] = $val; } $params2['openid.mode'] = 'check_authentication'; $ret = $this->_httpRequest($server, 'POST', $params2, $status); if ($status != 200) { $this->_setError("'Dumb' signature verification HTTP request failed"); return false; } $r = array(); if (is_string($ret)) { foreach (explode("\n", $ret) as $line) { $line = trim($line); if (!empty($line)) { $x = explode(':', $line, 2); if (is_array($x) && count($x) == 2) { list($key, $value) = $x; $r[trim($key)] = trim($value); } } } } $ret = $r; if (!empty($ret['invalidate_handle'])) { if ($this->_storage->getAssociationByHandle($ret['invalidate_handle'], $url, $macFunc, $secret, $expires)) { $this->_storage->delAssociation($url); } } if (isset($ret['is_valid']) && $ret['is_valid'] == 'true') { if (!Zend_OpenId_Extension::forAll($extensions, 'parseResponse', $params)) { $this->_setError("Extension::parseResponse failure"); return false; } return true; } $this->_setError("'Dumb' signature verification failed"); return false; } }
function decryptString($str, $key) { $arr = explode(".", $str); array_shift($arr); $str = ""; for ($i = 0; $i < count($arr); $i++) { $str .= CHR(intval($arr[$i])); } $len1 = strlen($str); $len2 = strlen($key); $len = min($len1, $len2); $result = ""; for ($i = 0; $i < $len1; $i++) { if ($i < $len) { $result .= CHR(ORD(SUBSTR($str, $i, 1)) ^ ORD(SUBSTR($key, $i, 1))); } else { $result .= SUBSTR($str, $i, 1); } } return $result; }