function verifyparent() { if (!checkurl()) { error('Access Denied! Try to refresh the page'); die; } signalurl(); }
/** * Create the thumbnails for the Video * $opts: * -input: The input file to be used. * -name: The output name to be used. (default video name) * -output: The output directory where the thumbnails and vtt file will be saved * -timespan: The time span (in seconds) between each thumbnail (default, {$params['timespan']}) * -width: The max width of the thumbnail (default, {$params['thumbWidth']}) * -verbose: Verbose - don't coalesce the thumbnails into one image (boolean) * -poster: Generate poster image from a random frame in the video (boolean) * -delete: Delete any previous thumbnails that match before generating new images (boolean) * -videotypes: Accepted video content types. Default: array('video/mp4') (Array) * */ function createthumbnail($opts) { $params = ['library' => 'ffmpeg', 'input' => null, 'output' => __DIR__, 'timespan' => 10, 'thumbWidth' => 120, 'spriteWidth' => 10, 'videotypes' => array('video/mp4')]; // process input parameters if (isset($opts['library'])) { $params['library'] = $opts['library']; } $params['input'] = escapeshellarg($opts['input']); if (isset($opts['output'])) { $params['output'] = realpath($opts['output']); } if (isset($opts['timespan']) && (int) $opts['timespan']) { $params['timespan'] = $opts['timespan']; } if (isset($opts['width']) && (int) $opts['width']) { $params['thumbWidth'] = $opts['width']; } if (isset($opts['videotypes']) && is_array($opts['videotypes'])) { $params['videotypes'] = $opts['videotypes']; } $commands = ['details' => $params['library'] . ' -i %s 2>&1', 'poster' => $params['library'] . ' -ss %d -i %s -y -vframes 1 "%s/%s-poster.jpg" 2>&1', 'thumbs' => $params['library'] . ' -ss %0.04f -i %s -y -an -sn -vsync 0 -q:v 5 -threads 1 ' . '-vf scale=%d:-1,select="not(mod(n\\,%d))" "%s/thumbnails/%s-%%04d.jpg" 2>&1']; // sanity checks if (!is_readable($opts['input'])) { if (filter_var($opts['input'], FILTER_VALIDATE_URL)) { if (checkurl($opts['input'], $params['videotypes']) === false) { throw new ThumbnailWebVttException("Cannot read the url file '{$opts['input']}'"); } } else { throw new ThumbnailWebVttException("Cannot read the input file '{$opts['input']}'"); } } if (!is_writable($params['output'])) { throw new ThumbnailWebVttException("Cannot write to output directory '{$opts['output']}'"); } if (!file_exists($params['output'] . '/thumbnails')) { if (!mkdir($params['output'] . '/thumbnails')) { throw new ThumbnailWebVttException("Could not create thumbnail output directory '{$params['output']}/thumbnails'"); } } $details = shell_exec(sprintf($commands['details'], $params['input'])); if ($details === null || !preg_match('/^(?:\\s+)?' . $params['library'] . ' version ([^\\s,]*)/i', $details)) { throw new ThumbnailWebVttException('Cannot find ' . $params['library'] . ' - try specifying the path in the $params variable'); } // determine some values we need $time = $fps = []; preg_match('/Duration: ((\\d+):(\\d+):(\\d+))\\.\\d+, start: ([^,]*)/is', $details, $time); preg_match('/\\b(\\d+(?:\\.\\d+)?) fps\\b/', $details, $fps); $duration = $time[2] * 3600 + $time[3] * 60 + $time[4]; $start = $time[5]; $fps = $fps[1]; $name = isset($opts['name']) ? $opts['name'] : strtolower(substr(basename($opts['input']), 0, strrpos(basename($opts['input']), '.'))); // generate random poster if required if (isset($opts['poster']) && $opts['poster'] === TRUE) { shell_exec(sprintf($commands['poster'], rand(1, $duration - 1), $opts['input'], $params['output'], $name)); } // generate all thumbnail images $filter = function ($current, $key, $iterator) use($name) { return $current->isFile() && preg_match("!{$name}-\\d{4}\\.jpg\$!", $current->getFilename()); }; if (isset($opts['delete']) && $opts['delete'] === TRUE) { $files = new CallbackFilterIterator(new FilesystemIterator("{$params['output']}/thumbnails"), $filter); foreach ($files as $f) { unlink($f); } } shell_exec(sprintf($commands['thumbs'], $start + 0.0001, $params['input'], $params['thumbWidth'], $params['timespan'] * $fps, $params['output'], $name)); $files = array_values(iterator_to_array(new CallbackFilterIterator(new FilesystemIterator("{$params['output']}/thumbnails"), $filter))); if (!($total = count($files))) { throw new ThumbnailWebVttException("Could not find any thumbnails matching '{$params['output']}/thumbnails/{$name}-\\d{4}.jpg'"); } sort($files, SORT_NATURAL); // create coalesce image if needs be if (isset($opts['verbose']) && $opts['verbose'] === FALSE) { $thumbsAcross = min($total, $params['spriteWidth']); $sizes = getimagesize($files[0]); $rows = ceil($total / $thumbsAcross); $w = $sizes[0] * $thumbsAcross; $h = $sizes[1] * $rows; $coalesce = imagecreatetruecolor($w, $h); } // generate vtt file, merge thumbnails if needs be $vtt = "WEBVTT\n\n"; for ($rx = $ry = $s = $f = 0; $f < $total; $f++) { $t1 = sprintf('%02d:%02d:%02d.000', $s / 3600, $s / 60 % 60, $s % 60); $s += $params['timespan']; $t2 = sprintf('%02d:%02d:%02d.000', $s / 3600, $s / 60 % 60, $s % 60); if (isset($opts['verbose']) && $opts['verbose'] !== FALSE) { $vtt .= "{$t1} --> {$t2}\nthumbnails/" . basename($files[$f]); } else { if ($f && !($f % $thumbsAcross)) { $rx = 0; ++$ry; } imagecopymerge($coalesce, imagecreatefromjpeg($files[$f]), $rx * $sizes[0], $ry * $sizes[1], 0, 0, $sizes[0], $sizes[1], 100); $vtt .= sprintf("%s --> %s\n{$name}.jpg#xywh=%d,%d,%d,%d", $t1, $t2, $rx++ * $sizes[0], $ry * $sizes[1], $sizes[0], $sizes[1]); } $vtt .= "\n\n"; } // tidy up if (isset($opts['verbose']) && $opts['verbose'] === FALSE) { imagejpeg($coalesce, "{$params['output']}/{$name}.jpg", 75); for ($s = 0, $f = 0; $f < $total; $f++) { unlink($files[$f]); } rmdir($params['output'] . '/thumbnails'); } file_put_contents("{$params['output']}/{$name}.vtt", $vtt); return $params['output'] . '/' . $name . '.vtt'; }
<script> var price3 = 0; </script> <p><img src="../pics/str.gif" width="5" height="9" alt=""> <strong>Информация о заказе</strong></p> <!--<p><a style="font-size: 20px; color: navy;">Шаг 3: Заполните форму</a><br></p>--> <table border="0" cellspacing="0" cellpadding="3" width="100%"> <tr bgcolor="#e0e0e0"><td><b>Телефон, Имя</b></td><td><input type="text" class="text_forms" style="width: 300px; font-size: 14pt;" name="tel"></td></tr> <tr bgcolor="#efefef"><td><b>E-mail</b></td><td><input type="text" class="text_forms" style="width: 300px; font-size: 14pt;" name="eml" id="eml"></td></tr> <tr bgcolor="#e0e0e0"><td width="300"><b>Файл-Вложение</b><br><font size=-2>файл во вложении должен быть не более 2Мб<br /> Файл проеверен и не нарушает законодательства РФ</font></td><td width="650"><input type="file" class="text_forms" style="width: 300px;" name="pict"></td></tr> <tr bgcolor="#efefef"><td valign="top"><b>Дополнительная информация</b></td><td><textarea type="text" class="text_forms" style="width:300px; height:70px" name="text"></textarea></td></tr> </table> <input type="hidden" name="myurl" value="<?php $url = checkurl(); function checkurl() { setlocale(LC_ALL, 'ru_RU.CP1251'); $result = ''; $url = $_SERVER['PHP_SELF']; //echo $url; $url = preg_replace("/([-a-zA-Z-0-9.]+):\\/\\/([-a-zA-Z-0-9.]+)\\//i", '', $url); $url = preg_replace("/(\\/+)|(_+)/i", '-', $url); $url = preg_replace("/\\.\\w+/i", '', $url); $url = preg_replace("/^-/i", '', $url); $result = $url; return $result; } echo $url; ?> " /> <p style="font-size: 14pt;"><strong>Стоимость Вашего заказа: <span style="color: #f00;" id="price"></span> руб</strong></p> <p align="center"><input type="Hidden" name="form" value="1"><!--<input type="reset" value="очистить форму" style="width:30%" class="button">--> <input type="button" onclick="checkFilial(); checkRequired()" value="Заказать печать" style="width: 278px; height: 80px; background: #f90 url('/i/button.jpg') left top no-repeat; border: 0; color: #fff; font-size: 14pt;"></p>
function add() { global $settings; $url = checkurl($_POST['url']); $name = input($_POST['name']); if (strlen($name) > 40) { error('Your link name is too long! Please limit your name to maximum 40 chars!'); } $start_from = input($_POST['count']); if (preg_match("/\\D/", $start_from)) { $start_from = 0; } $previd = file_get_contents($settings['idfile']); $previd = trim($previd); $previd++; $fp = @fopen($settings['idfile'], 'w') or error('Can\'t write to the IDs file (' . $settings['idfile'] . ')! Make sure PHP scripts have permission to write to this file (CHMOD it to 666 on LINUX machines!)'); flock($fp, LOCK_EX); fputs($fp, $previd); flock($fp, LOCK_UN); fclose($fp); $addline = $previd . '%%' . date('Y/m/d') . '%%' . $url . '%%' . $start_from . '%%' . $name . "\r\n"; $fp = @fopen($settings['logfile'], 'a') or error('Can\'t write to the log file (' . $settings['logfile'] . ')! Make sure PHP scripts have permission to write to this file (CHMOD it to 666 on LINUX machines!)'); flock($fp, LOCK_EX); fputs($fp, $addline); flock($fp, LOCK_UN); fclose($fp); printHeader(); ?> <tr> <td class="vmes"><p> </p> <div align="center"><center> <table width="400" cellpadding="3"> <tr> <td align="center" class="head">Link added</td> </tr> <tr> <td class="dol"> <form> <p> </p> <p align="center"><b>New link successfully added!</b></p> <p>A new link with ID <?php echo $previd; ?> has been successfully added.</p> <p>To count clicks on this link use this URL:<br><br> <b><?php echo "{$settings['click_url']}?id={$previd}"; ?> </b><br><br> instead of the old one:<br><br> <?php echo $url; ?> </p> <p> </p> <p align="center"> <a href="index.php"> Click to continue</a></p> <p> </p> </td> </tr> </table> </div></center> <p> </p> <p> </p> <p> </p> </td> </tr> <?php printFooter(); exit; }
} } } if (isset($_POST['changeuserurl'])) { $URL = $_POST["newurl1"]; $id = $_POST["emailchoice"]; $id = mysqli_fetch_assoc(mysqli_query($con, "SELECT ownerId FROM owner WHERE email='{$id}'"))['ownerId']; if ($id == 'na') { $_SESSION["error"] = "emailselect"; header('Location:settings.php'); } else { if ($URL == mysqli_fetch_assoc(mysqli_query($con, "SELECT website FROM project WHERE owner_project='{$id}'"))['website']) { $_SESSION["error"] = "sameurl1"; header('Location:settings.php'); } else { if (checkurl($URL) == false) { $_SESSION["error"] = "invalidurl1"; header('Location:settings.php'); } else { if ($URL != '') { mysqli_query($con, "UPDATE project SET website='{$URL}' WHERE owner_project='{$id}'"); $_SESSION["error"] = "updatedurl1"; header('Location:settings.php'); } } } } } if (isset($_POST['changeadminsettings'])) { if (isset($_POST['reset'])) { mysqli_query($con, "UPDATE globalsettings SET loop_timeout=600,sleep_time=5,database_write_quota=5 ");
$t_url = escapeshellcmd($t_url); $localurl = $svnparentpath[0] == '/' ? "file://{$svnparentpath}/{$t_url}" : "file:///{$svnparentpath}/{$t_url}"; exec("{$svn}svn info \"{$localurl}\"", $dirs_arr); if (count($dirs_arr) > 1) { return true; } else { return false; } } return true; } $dir = trim(mysql_real_escape_string($_GET['d'])); $dir = str_replace($svnurl, '', $dir); $dir = $dir[0] == '/' ? substr($dir, 1) : $dir; $dir = str_replace('//', '/', $dir); if (!checkurl($dir)) { echo "<script>alert('the URL is incorrect!')</script>"; $dir = '/'; } list($repos, $dir) = explode('/', $dir, 2); $dir = $dir[strlen($dir) - 1] == '/' ? '/' . substr($dir, 0, -1) : '/' . $dir; $firstdir = "<a href='{$svnurl}/{$repos}{$dir}' target=_blank>{$repos}{$dir}</a>"; $authz = false; if (empty($repos) and $dir == '/') { $repos = '/'; $dir = ''; } //将$line中的所有[Maiasvn:variable]的内容用$var替换 function parseTags($line, $vars) { $l = '';
<?php $uri = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : null; $action = null; if ($uri) { $uri = explode("/", $uri); $action = isset($uri[2]) ? $uri[2] : null; $action = explode("?", $action); $action = isset($action[0]) ? $action[0] : null; } $payhost = isset($_POST['payhost']) ? $_POST['payhost'] : ''; if (!$payhost) { if (!checkurl()) { $action = null; } } else { if (!payHost($payhost) && !payHost($payhost, 'admin')) { $action = null; } } function checkurl() { if (!isset($_SERVER['HTTP_REFERER'])) { return false; } $urlar = parse_url($_SERVER['HTTP_REFERER']); $port = isset($urlar["port"]) ? ':' . $urlar["port"] : ''; if ('80' == $port) { $port = ''; } $fhost = $urlar["host"] . $port;
/* Do the action that is set in $action variable */ if ($action == "login") { checkpassword(); $_SESSION['logged'] = "Y"; mainpage("welcome"); } elseif ($action == "remove") { checklogin(); $id = checkid(); removelink($id); } elseif ($action == "reset") { checklogin(); $id = checkid(); resetlink($id); } elseif ($action == "add") { checklogin(); $url = checkurl($_POST['url']); add($url); } elseif ($action == "restore") { checklogin(); restore(); } elseif ($action == "logout") { logout(); } else { login(); } exit; function restore() { global $settings; $ext = strtolower(substr(strrchr($_FILES['backup']['name'], "."), 1)); if ($ext != "txt") {
function validate_servers() { /****************************************************************************************************************/ if (isset($_POST["server_data"]["step"]) && $_POST["server_data"]["step"] == 1 || isset($_POST['testing_connect'])) { /****************************************************************************************************************/ $ftp_hostname = strip_tags(trim($_POST["server_data"]["ftp_hostname"])); $ftp_username = strip_tags(trim($_POST["server_data"]["ftp_username"])); $ftp_password = strip_tags(trim($_POST["server_data"]["ftp_password"])); $mysql_host = strip_tags(trim($_POST["server_data"]["mysql_host"])); $mysql_database = strip_tags(trim($_POST["server_data"]["mysql_database"])); $mysql_username = strip_tags(trim($_POST["server_data"]["mysql_username"])); $mysql_password = strip_tags(trim($_POST["server_data"]["mysql_password"])); /* * Try FTP && DB connect */ $ftp_connect = @ftp_connect($ftp_hostname); if ($mysql_host == "localhost" || $mysql_host == "localhost:3306" || $mysql_host == "127.0.0.1" || $mysql_host == "127.0.0.1:3306") { $response["db"] = false; $response["db_message"] = "WARNING : You have entered local settings for database server"; } else { $db_connect = @mysql_connect($mysql_host, $mysql_username, $mysql_password); if (!$db_connect) { $response["db"] = "wrong"; $response["db_message"] = "Incorrect database connection"; } else { $response["db"] = true; $response["db_message"] = "Database connection established"; mysql_close($db_connect); } } /* END */ /* * Try FTP Login */ if ($ftp_connect == false) { $response["ftp"] = false; $response["ftp_message"] = "Incorrect FTP address server"; } else { $ftp_login = @ftp_login($ftp_connect, $ftp_username, $ftp_password); if ($ftp_login == false) { $response["ftp"] = false; $response["ftp_login"] = false; $response["ftp_message"] = "Incorrect FTP username or password"; } else { $response["ftp_login"] = true; $response["ftp"] = true; $response["ftp_message"] = "FTP connection established"; ftp_close($ftp_connect); } } /* END */ if (isset($_POST['testing_connect']) && $_POST['testing_connect'] == "test") { /* * Testing response */ echo json_encode($response); wp_die(); /* END */ } else { $url = trim(strip_tags($_POST["server_data"]["site_url"])); /* *check_url */ if (checkurl($url) != -1 && checkurl($url) != 1) { $first_tab_data['site_url'] = strtolower(checkurl($url)); } else { $first_tab_data['site_url'] = false; } /* *check_type */ if (trim(strip_tags($_POST["server_data"]["type"]))) { $first_tab_data['type'] = trim(strip_tags($_POST["server_data"]["type"])); } else { $first_tab_data['type'] = false; } /* END */ /* *check_ftp */ if ($response["ftp"] == true) { $first_tab_data["ftp_hostname"] = $ftp_hostname; $first_tab_data["ftp"] = "ok"; } else { $first_tab_data["ftp_hostname"] = true; $first_tab_data["ftp"] = "WARNING : We could not establish a connection with your FTP server"; } $first_tab_data['ftp_host'] = $ftp_hostname; /* END */ /* *check_ftp_login */ if ($response["ftp_login"] == true) { $first_tab_data['ftp_username'] = $ftp_username; $first_tab_data['ftp_password'] = $ftp_password; $first_tab_data["ftp"] = "ok"; } else { if (!$ftp_username) { $first_tab_data['ftp_username'] = false; } else { $first_tab_data["ftp"] = "WARNING : We could not establish a connection with your FTP server! Please check your login or password"; $first_tab_data['ftp_username'] = $ftp_username; } if (!$ftp_password) { $first_tab_data['ftp_password'] = false; } else { $first_tab_data['ftp_username'] = $ftp_password; $first_tab_data["ftp"] = "WARNING : We could not establish a connection with your FTP server! Please check your login or password"; } } /* END */ /* *check_db */ if ($response["db"] != "wrong" && $response["db"] != false || $response["db"] == 1) { $first_tab_data['mysql_host'] = $mysql_host; $first_tab_data['mysql_database'] = $mysql_database; $first_tab_data['mysql_username'] = $mysql_username; $first_tab_data['mysql_password'] = $mysql_password; $first_tab_data['db_connect'] = "ok"; } else { if (!$mysql_host) { $first_tab_data['mysql_host'] = false; } else { $first_tab_data['mysql_host'] = $mysql_host; } if (!$mysql_database) { $first_tab_data['mysql_database'] = false; } else { $first_tab_data['mysql_database'] = $mysql_database; } if (!$mysql_username) { $first_tab_data['mysql_username'] = false; } else { $first_tab_data['mysql_username'] = $mysql_username; } if (!$mysql_password) { $first_tab_data['mysql_password'] = false; } else { $first_tab_data['mysql_password'] = $mysql_password; } if ($response["db"] == false) { $first_tab_data["db_connect"] = "WARNING : You have entered local settings for database server"; } if ($response["db"] == "wrong") { $first_tab_data["db_connect"] = "WARNING:Incorrect database connection! Please check your entered data or check access from your host"; } } /* END */ $_SESSION['first_tab_data'] = $first_tab_data; echo json_encode($_SESSION['first_tab_data']); } /**********************************************************************************/ } elseif (isset($_POST["server_data"]["step"]) && $_POST["server_data"]["step"] == 2) { /**********************************************************************************/ /* *Check site_name */ if (strip_tags(trim($_POST["server_data"]["site_name"]))) { $two_tab_data['site_name'] = strip_tags(trim($_POST["server_data"]["site_name"])); } else { $two_tab_data['site_name'] = false; } /* END */ /* *Check site_tagline */ if (strip_tags(trim($_POST["server_data"]["site_tagline"]))) { $two_tab_data['site_tagline'] = strip_tags(trim($_POST["server_data"]["site_tagline"])); } else { $two_tab_data['site_tagline'] = true; } $email = strip_tags(trim($_POST["server_data"]["site_tagline"])); /* END */ /* *Check site_email */ if (check_email($email)) { $two_tab_data['site_email'] = strip_tags(trim($_POST["server_data"]["site_email"])); } else { $two_tab_data['site_email'] = false; } /* END */ /* *Check site_meta_desc */ if (strip_tags(trim($_POST["server_data"]["site_meta_desc"]))) { $two_tab_data['site_meta_desc'] = strip_tags(trim($_POST["server_data"]["site_meta_desc"])); } else { $two_tab_data['site_meta_desc'] = true; } /* END */ /* *Check admin_name */ if (strip_tags(trim($_POST["server_data"]["admin_name"]))) { $two_tab_data['admin_name'] = strip_tags(trim($_POST["server_data"]["admin_name"])); } else { $two_tab_data['admin_name'] = false; } /* END */ /* *Check admin_password */ if (strip_tags(trim($_POST["server_data"]["admin_password"]))) { $two_tab_data['admin_password'] = strip_tags(trim($_POST["server_data"]["admin_password"])); } else { $two_tab_data['admin_password'] = false; } /* END */ /* *Check admin_nickname */ if (strip_tags(trim($_POST["server_data"]["admin_nickname"]))) { $two_tab_data['admin_nickname'] = strip_tags(trim($_POST["server_data"]["admin_nickname"])); } else { $two_tab_data['admin_nickname'] = false; } /* END */ $_SESSION['two_tab_data'] = $two_tab_data; echo json_encode($two_tab_data); /**********************************************************************************/ } elseif (isset($_POST["server_data"]["step"]) && $_POST["server_data"]["step"] == 3) { /**********************************************************************************/ /* *Check Facebook */ if (strip_tags(trim($_POST["server_data"]["facebook"]))) { $url = strip_tags(trim($_POST["server_data"]["facebook"])); if (checkurl($url) != -1 && checkurl($url) != 1) { $three_tab_data['facebook'] = $_POST["server_data"]["facebook"]; } else { $three_tab_data['facebook'] = false; } } else { $three_tab_data['facebook'] = "empty"; } /* END */ /* *Check Twitter */ if (strip_tags(trim($_POST["server_data"]["twitter"]))) { $url = strip_tags(trim($_POST["server_data"]["twitter"])); if (checkurl($url) != -1 && checkurl($url) != 1) { $three_tab_data['twitter'] = $_POST["server_data"]["twitter"]; } else { $three_tab_data['twitter'] = false; } } else { $three_tab_data['twitter'] = "empty"; } /* END */ /* *Check Linkedin */ if (strip_tags(trim($_POST["server_data"]["linkedin"]))) { $url = strip_tags(trim($_POST["server_data"]["linkedin"])); if (checkurl($url) != -1 && checkurl($url) != 1) { $three_tab_data['linkedin'] = $_POST["server_data"]["linkedin"]; } else { $three_tab_data['linkedin'] = false; } } else { $three_tab_data['linkedin'] = "empty"; } /* END */ /* *Check Google */ if (strip_tags(trim($_POST["server_data"]["google"]))) { $url = strip_tags(trim($_POST["server_data"]["google"])); if (checkurl($url) != -1 && checkurl($url) != 1) { $three_tab_data['google'] = $_POST["server_data"]["google"]; } else { $three_tab_data['google'] = false; } } else { $three_tab_data['google'] = "empty"; } /* END */ /* *Check Youtube */ if (strip_tags(trim($_POST["server_data"]["youtube"]))) { $url = strip_tags(trim($_POST["server_data"]["youtube"])); if (checkurl($url) != -1 && checkurl($url) != 1) { $three_tab_data['youtube'] = $_POST["server_data"]["youtube"]; } else { $three_tab_data['youtube'] = false; } } else { $three_tab_data['youtube'] = "empty"; } /* END */ $_SESSION['three_tab_data'] = $three_tab_data; echo json_encode($three_tab_data); /**********************************************************************************/ } elseif (isset($_POST["server_data"]["step"]) && $_POST["server_data"]["step"] == 4) { /**********************************************************************************/ /* *Check phone */ if (strip_tags(trim($_POST["server_data"]["company_name"]))) { $four_tab_data['company_name'] = strip_tags(trim($_POST["server_data"]["company_name"])); } else { $four_tab_data['company_name'] = "empty"; } /* END */ /* *Check phone */ if (strip_tags(trim($_POST["server_data"]["street"]))) { $four_tab_data['street'] = strip_tags(trim($_POST["server_data"]["street"])); } else { $four_tab_data['street'] = "empty"; } /* END */ /* *Check phone */ if (strip_tags(trim($_POST["server_data"]["city"]))) { $four_tab_data['city'] = strip_tags(trim($_POST["server_data"]["city"])); } else { $four_tab_data['city'] = "empty"; } /* END */ /* *Check phone */ if (strip_tags(trim($_POST["server_data"]["state"]))) { $four_tab_data['state'] = strip_tags(trim($_POST["server_data"]["state"])); } else { $four_tab_data['state'] = "empty"; } /* END */ /* *Check phone */ if (strip_tags(trim($_POST["server_data"]["zip"]))) { $four_tab_data['zip'] = strip_tags(trim($_POST["server_data"]["zip"])); } else { $four_tab_data['zip'] = "empty"; } /* END */ /* *Check phone */ if (strip_tags(trim($_POST["server_data"]["phone"]))) { if (preg_match("/^[0-9]+\$/", strip_tags(trim($_POST["server_data"]["phone"])))) { $four_tab_data['phone'] = strip_tags(trim($_POST["server_data"]["phone"])); } else { $four_tab_data['phone'] = false; } } else { $four_tab_data['phone'] = "empty"; } /* END */ $_SESSION['compile_data']['four_tab_data'] = $four_tab_data; $_SESSION['compile_data']['three_tab_data'] = $_SESSION['three_tab_data']; $_SESSION['compile_data']['two_tab_data'] = $_SESSION['two_tab_data']; $_SESSION['compile_data']['first_tab_data'] = $_SESSION['first_tab_data']; // unset($_SESSION['three_tab_data'], $_SESSION['two_tab_data'], $_SESSION['first_tab_data']); echo json_encode($_SESSION); } wp_die(); }
<html> <body> <?php require_once 'functions.php'; $as = digits(23); //echo(int) $as.'dfs'.'<br>'; $a = letter('123'); //echo(int) $a.'asd'.'<br>'; $b = checklength('adfdkzisdmfjk', 3, 9); //echo(int) $b.'sd'.'<br>'; $d = checkmail('asd-432', 'CA'); //echo(int)$d.'fcxgxd'.'<br>'; $check = checkurl('http//www.someone.co'); //echo(int) $check.'sdg'.'<br.'; $emails = checkemail('*****@*****.**'); //echo(int) $emails.'sdaerg'.'<br>'; $pass = checkpassword('rishu-23'); echo (int) $pass . '<br>'; ?> </body> </html>