Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- class Utils {
- public function translateContentArray($content_array) {
- if (0 < strlen($content_array)) {
- $content_array = json_decode($content_array, true);
- foreach ($content_array as $key => $content) {
- $content_array[$content["id"]] = $content;
- unset($content_array[$key]);
- }
- }
- return $content_array;
- }
- public function getClassesByCityAndType($city, $type) {
- global $pdo;
- global $sb;
- $params = array(":city" => $city, ":class_type" => $type);
- $stmt = $pdo->prepare($sb->select("classes")->where("city", "=", ":city")->where("class_type", "=", ":class_type")->generate());
- $stmt->setFetchMode(PDO::FETCH_ASSOC);
- $stmt->execute($params);
- $classes = $stmt->fetchAll();
- return $classes;
- }
- public function getUrlById() {
- global $pdo;
- global $sb;
- $stmt = $pdo->prepare($sb->select("pages", "id,slug")->generate());
- $stmt->setFetchMode(PDO::FETCH_ASSOC);
- $stmt->execute();
- $pages = $stmt->fetchAll();
- return $this->idsToKey($pages);
- }
- public function getVideoPlayerBySource($source, $video_id, $width = "277", $height = "170") {
- switch ($source) {
- case "youtube":
- echo("<iframe src=\"http://www.youtube.com/embed/" . $video_id . "?theme=light&color=red&rel=0&modestbranding=1&showinfo=0\" frameborder=\"0\" width=\"" . $width . "\" height=\"" . $height . "\" allowfullscreen></iframe>");
- break;
- case "vimeo":
- echo("<iframe src=\"//player.vimeo.com/video/" . $video_id . "\" width=\"" . $width . "\" height=\"" . $height . "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
- break;
- default:
- break;
- }
- }
- public function normalizeChars($string, $underscore_spaces = true) {
- $normalizeChars = array("\xc5\xa0" => "S", "\xc5\xa1" => "s", "\xc3\x90" => "Dj", "\xc5\xbd" => "Z", "\xc5\xbe" => "z", "\xc3\x80" => "A", "\xc3\x81" => "A", "\xc3\x82" => "A", "\xc3\x83" => "A", "\xc3\x84" => "A", "\xc3\x85" => "A", "\xc3\x86" => "A", "\xc3\x87" => "C", "\xc3\x88" => "E", "\xc3\x89" => "E", "\xc3\x8a" => "E", "\xc3\x8b" => "E", "\xc3\x8c" => "I", "\xc3\x8d" => "I", "\xc3\x8e" => "I", "\xc3\x8f" => "I", "\xc3\x91" => "N", "\xc3\x92" => "O", "\xc3\x93" => "O", "\xc3\x94" => "O", "\xc3\x95" => "O", "\xc3\x96" => "O", "\xc3\x98" => "O", "\xc3\x99" => "U", "\xc3\x9a" => "U", "\xc3\x9b" => "U", "\xc3\x9c" => "U", "\xc3\x9d" => "Y", "\xc3\x9e" => "B", "\xc3\x9f" => "Ss", "\xc3\xa0" => "a", "\xc3\xa1" => "a", "\xc3\xa2" => "a", "\xc3\xa3" => "a", "\xc3\xa4" => "a", "\xc3\xa5" => "a", "\xc3\xa6" => "a", "\xc3\xa7" => "c", "\xc3\xa8" => "e", "\xc3\xa9" => "e", "\xc3\xaa" => "e", "\xc3\xab" => "e", "\xc3\xac" => "i", "\xc3\xad" => "i", "\xc3\xae" => "i", "\xc3\xaf" => "i", "\xc3\xb0" => "o", "\xc3\xb1" => "n", "\xc3\xb2" => "o", "\xc3\xb3" => "o", "\xc3\xb4" => "o", "\xc3\xb5" => "o", "\xc3\xb6" => "o", "\xc3\xb8" => "o", "\xc3\xb9" => "u", "\xc3\xba" => "u", "\xc3\xbb" => "u", "\xc3\xbd" => "y", "\xc3\xbd" => "y", "\xc3\xbe" => "b", "\xc3\xbf" => "y", "\xc6\x92" => "f");
- if ($underscore_spaces) {
- $normalizeChars[" "] = "_";
- }
- return strtr($string, $normalizeChars);
- }
- public function encodeSensitiveQuery($string) {
- return base64_encode($string);
- }
- public function decodeSensitiveQuery($string) {
- return base64_decode($string);
- }
- .............................................................................
- ...............................
- .........
Add Comment
Please, Sign In to add comment