function parent_list() { $parent_set = get_all_parents(); $output = ""; while ($parent = mysql_fetch_array($parent_set)) { $output .= "<tr id=\"{$parent['hash']}\">\n\t\t\t\t<td><input type=\"checkbox\"></td>"; $output .= "<td>" . $parent['full_name'] . "</td>"; $output .= "<td>" . get_phone($parent['id'], "contacts"); $output .= "</td>"; $output .= "<td>" . get_email($parent['id'], "contacts"); $output . -"</td>"; $output .= "<td>{$parent['addedon']}</td></tr>"; } return $output; }
function the_phone($number, $prefix = "+1") { echo get_phone($number, $prefix); }
if (substr(sprintf('%o', fileperms('../view/upload/images/cache/index.html')), -4) != '0666') { $errors[] = 'Файл "view/upload/images/cache/index.html" требует права 0666'; } foreach (array('../view/cache/', '../view/templates_c/', '../view/upload/images/', '../view/upload/images/cache/', '../view/upload/images/thumbnail/', '../model/data/') as $file) { if (substr(sprintf('%o', fileperms($file)), -4) != '0777') { $errors[] = 'Папка "' . preg_replace('/\\.\\.\\//', '', $file) . '" требует права 0777'; } } /* Test Mysql */ if (isset($_POST['command']) && $_POST['command'] == 'setup') { /* Test Data */ if (!isset($site_name[1])) { $errors[] = 'Название сайта слишком коротко'; } /* Test user Data */ $array_tel = get_phone($user_login); if (!isset($array_tel[0]) || !in_array($array_tel[0], array(7, 380))) { $errors[] = 'Номер телефона этой страны не поддерживается'; } if (!isset($user_pass[3])) { $errors[] = 'Пароль слишком краток'; } if (!mysql_connect($db_host, $db_user, $db_pass)) { $errors[] = 'Не верны данные доступа к Базе Данных'; } if (!mysql_select_db($db_name)) { $errors[] = 'Не найдена База Данных'; } preg_match('@[0-9]+\\.[0-9]+@', mysql_get_server_info(), $version_mysql); if (version_compare($version_mysql[0], '5.3', '<')) { $errors[] = 'Необходим Mysql 5.3 или выше';