• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP totranslit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中totranslit函数的典型用法代码示例。如果您正苦于以下问题:PHP totranslit函数的具体用法?PHP totranslit怎么用?PHP totranslit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了totranslit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: load

 function load($tpl_name, $menu = 'log')
 {
     $url = @parse_url($tpl_name);
     $file_path = dirname($this->clear_url_dir($url['path']));
     $tpl_name = pathinfo($url['path']);
     $tpl_name = totranslit($tpl_name['basename']);
     $tpl = file_get_contents(ROOT_DIR . "/templates/" . $this->config_dle['skin'] . "/billing/" . $tpl_name . ".tpl");
     if (!$tpl) {
         return $this->lang['cabinet_theme_error'] . "{$tpl_name}.tpl";
     }
     foreach ($this->elements as $key => $value) {
         $tpl = str_replace($key, $value, $tpl);
     }
     foreach ($this->element_block as $key => $value) {
         $tpl = preg_replace("'\\[" . $key . "\\].*?\\[/" . $key . "\\]'si", $value, $tpl);
     }
     /* Plugins menu */
     $tpl_plugin = $this->T_preg_match($tpl, '~\\[plugin\\](.*?)\\[/plugin\\]~is');
     $plugins_list = $this->T_plugins();
     $plugins = "";
     if (count($plugins_list)) {
         foreach ($plugins_list as $name => $pl_config) {
             $time_plugins_theme = $tpl_plugin;
             $time_plugins_theme = str_replace("{plugin_link}", $name, $time_plugins_theme);
             $time_plugins_theme = str_replace("{plugin_name}", $pl_config['name'], $time_plugins_theme);
             $time_plugins_theme = $menu == $name ? str_replace("{plugin_active}", "_active", $time_plugins_theme) : str_replace("{plugin_active}", "", $time_plugins_theme);
             $time_plugins_theme = str_replace("{URL_CABINET}", $this->config_dle['http_home_url'] . $this->config['page'] . ".html", $time_plugins_theme);
             $plugins .= $time_plugins_theme;
         }
     }
     $tpl = str_replace("{URL_CABINET}", $this->config_dle['http_home_url'] . $this->config['page'] . ".html", $tpl);
     $tpl = str_replace("{THEME}", $this->config_dle['http_home_url'] . "templates/" . $this->config_dle['skin'] . "/billing", $tpl);
     $tpl = str_replace("[active]" . $menu . "[/active]", "_active", $tpl);
     $tpl = str_replace("{BALANCE}", $this->member_id[$this->config['fname']] . " " . $this->pay_api->bf_declOfNum($this->config['currency']), $tpl);
     $tpl = preg_replace("'\\[active\\].*?\\[/active\\]'si", '', $tpl);
     $tpl = preg_replace("'\\[plugin\\].*?\\[/plugin\\]'si", $plugins, $tpl);
     $elements = array();
     return $tpl;
 }
开发者ID:Nurik4249,项目名称:DLE-Billing,代码行数:39,代码来源:user.theme.php


示例2: die

}
require_once ENGINE_DIR . '/modules/sitelogin.php';
if (!$is_logged or !$user_group[$member_id['user_group']]['allow_admin']) {
    die("error");
}
$buffer = "";
if ($_REQUEST['action'] == "clearCache") {
    if ($member_id['user_group'] != 1) {
        die("error");
    }
    $dle_api->clean_cache("stream-info");
    $dle_api->clean_cache("stream-info-key");
    $dle_api->clean_cache("stream-info-block");
    $buffer = "Кеш стрима успешно очищен.";
} elseif ($_REQUEST['action'] == 'setTitle') {
    $login = totranslit($_POST['login']);
    $error = array();
    $service = $_POST['service'];
    switch ($service) {
        case "twitch":
            $titleTW = gettwitch($login, true);
            if ($titleTW['status'] == '404') {
                $setTitle = false;
                $error = array("status" => inv("Данного логина не существует в этом сервисе стримминга. Проверьте правильность веденного логина пользователя."), "code" => 404);
            } else {
                $setTitle = $titleTW['status'];
            }
            break;
        case "goodgame":
            $titleGG = setTitleGG($login);
            if (!$titleGG) {
开发者ID:xxados,项目名称:stream-info,代码行数:31,代码来源:stream-info.php


示例3: define

@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE);
define('DATALIFEENGINE', true);
define('ROOT_DIR', substr(dirname(__FILE__), 0, -12));
define('ENGINE_DIR', ROOT_DIR . '/engine');
include ENGINE_DIR . '/data/config.php';
date_default_timezone_set($config['date_adjust']);
if ($config['http_home_url'] == "") {
    $config['http_home_url'] = explode("engine/ajax/complaint.php", $_SERVER['PHP_SELF']);
    $config['http_home_url'] = reset($config['http_home_url']);
    $config['http_home_url'] = "http://" . $_SERVER['HTTP_HOST'] . $config['http_home_url'];
}
require_once ENGINE_DIR . '/classes/mysql.php';
require_once ENGINE_DIR . '/data/dbconfig.php';
require_once ENGINE_DIR . '/modules/functions.php';
dle_session();
$_COOKIE['dle_skin'] = trim(totranslit($_COOKIE['dle_skin'], false, false));
$_TIME = time();
if ($_COOKIE['dle_skin']) {
    if (@is_dir(ROOT_DIR . '/templates/' . $_COOKIE['dle_skin'])) {
        $config['skin'] = $_COOKIE['dle_skin'];
    }
}
if ($config["lang_" . $config['skin']]) {
    if (file_exists(ROOT_DIR . '/language/' . $config["lang_" . $config['skin']] . '/website.lng')) {
        @(include_once ROOT_DIR . '/language/' . $config["lang_" . $config['skin']] . '/website.lng');
    } else {
        die("Language file not found");
    }
} else {
    include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng';
}
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:complaint.php


示例4: build_js

\t{$gallery}
//-->
</script>
HTML;
}
if ($config['allow_share'] and ($dle_module == "showfull" or $dle_module == "static")) {
    if (preg_match("/(msie)/i", $_SERVER['HTTP_USER_AGENT'])) {
        $js_array[] = "engine/classes/masha/ierange.js";
        $js_array[] = "engine/classes/masha/masha.js";
    } else {
        $js_array[] = "engine/classes/masha/masha.js";
    }
}
$js_array = build_js($js_array, $config);
if ($allow_comments_ajax and ($config['allow_comments_wysiwyg'] or $config['allow_quick_wysiwyg'])) {
    $lang['wysiwyg_language'] = totranslit($lang['wysiwyg_language'], false, false);
    if ($config['allow_quick_wysiwyg'] == "2" or $config['allow_comments_wysiwyg'] == "2") {
        $js_array .= "\n<script type=\"text/javascript\" src=\"{$config['http_home_url']}engine/editor/jscripts/tiny_mce/jquery.tinymce.js\"></script>";
    }
    if ($config['allow_quick_wysiwyg'] == "1" or $config['allow_comments_wysiwyg'] == "1") {
        $js_array .= "\n<script type=\"text/javascript\" src=\"{$config['http_home_url']}engine/editor/scripts/language/{$lang['wysiwyg_language']}/editor_lang.js\"></script>";
        $js_array .= "\n<script type=\"text/javascript\" src=\"{$config['http_home_url']}engine/editor/scripts/innovaeditor.js\"></script>";
    }
}
if ($config['allow_admin_wysiwyg'] == "1" or $config['allow_site_wysiwyg'] == "1" or $config['allow_static_wysiwyg'] == "1") {
    $js_array .= "\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js\"></script>";
    $js_array .= "\n<script type=\"text/javascript\" src=\"{$config['http_home_url']}engine/editor/scripts/webfont.js\"></script>";
    $js_array .= "\n<link media=\"screen\" href=\"{$config['http_home_url']}engine/editor/css/default.css\" type=\"text/css\" rel=\"stylesheet\" />";
}
if (strpos($tpl->result['content'], "<video") !== false) {
    $js_array .= "\n<link media=\"screen\" href=\"{$config['http_home_url']}engine/editor/scripts/common/mediaelement/mediaelementplayer.min.css\" type=\"text/css\" rel=\"stylesheet\" />";
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:index.php


示例5: trim

     $descr = $lang['rules_edit'];
 } else {
     $name = trim(totranslit($_POST['name'], true, false));
     $descr = trim($db->safesql(htmlspecialchars($_POST['description'])));
     if (!count($_POST['grouplevel'])) {
         $_POST['grouplevel'] = array("all");
     }
     $grouplevel = $db->safesql(implode(',', $_POST['grouplevel']));
 }
 $disable_index = isset($_POST['disable_index']) ? intval($_POST['disable_index']) : 0;
 $template = $db->safesql($template);
 $allow_template = intval($_POST['allow_template']);
 $allow_count = intval($_POST['allow_count']);
 $allow_sitemap = intval($_POST['allow_sitemap']);
 $tpl = trim(totranslit($_POST['static_tpl']));
 $skin_name = trim(totranslit($_POST['skin_name'], false, false));
 $newdate = $_POST['newdate'];
 if (isset($_POST['allow_date'])) {
     $allow_date = $_POST['allow_date'];
 } else {
     $allow_date = "";
 }
 if (isset($_POST['allow_now'])) {
     $allow_now = $_POST['allow_now'];
 } else {
     $allow_now = "";
 }
 // Обработка даты и времени
 $added_time = time() + $config['date_adjust'] * 60;
 $newsdate = strtotime($newdate);
 if ($allow_date != "yes") {
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:static.php


示例6: define

@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE);
define('DATALIFEENGINE', true);
define('ROOT_DIR', substr(dirname(__FILE__), 0, -12));
define('ENGINE_DIR', ROOT_DIR . '/engine');
include ENGINE_DIR . '/data/config.php';
if ($config['http_home_url'] == "") {
    $config['http_home_url'] = explode("engine/ajax/profile.php", $_SERVER['PHP_SELF']);
    $config['http_home_url'] = reset($config['http_home_url']);
    $config['http_home_url'] = "http://" . $_SERVER['HTTP_HOST'] . $config['http_home_url'];
}
require_once ENGINE_DIR . '/classes/mysql.php';
require_once ENGINE_DIR . '/data/dbconfig.php';
require_once ENGINE_DIR . '/modules/functions.php';
dle_session();
require_once ENGINE_DIR . '/classes/templates.class.php';
$_REQUEST['skin'] = trim(totranslit($_REQUEST['skin'], false, false));
$_TIME = time() + $config['date_adjust'] * 60;
if ($_REQUEST['skin'] == "" or !@is_dir(ROOT_DIR . '/templates/' . $_REQUEST['skin'])) {
    die("Hacking attempt!");
}
//################# Определение групп пользователей
$user_group = get_vars("usergroup");
if (!$user_group) {
    $user_group = array();
    $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC");
    while ($row = $db->get_row()) {
        $user_group[$row['id']] = array();
        foreach ($row as $key => $value) {
            $user_group[$row['id']][$key] = stripslashes($value);
        }
    }
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:profile.php


示例7: explode

 //Проверка на админа
 $row = $db->super_query("SELECT admin, del, ban FROM `" . PREFIX . "_communities` WHERE id = '{$id}'");
 if (stripos($row['admin'], "u{$user_id}|") !== false and isset($wall_text) and !empty($wall_text) or isset($attach_files) and !empty($attach_files) and $row['del'] == 0 and $row['ban'] == 0) {
     //Оприделение изображения к ссылке
     if (stripos($attach_files, 'link|') !== false) {
         $attach_arr = explode('||', $attach_files);
         $cnt_attach_link = 1;
         foreach ($attach_arr as $attach_file) {
             $attach_type = explode('|', $attach_file);
             if ($attach_type[0] == 'link' and preg_match('/http:\\/\\/(.*?)+$/i', $attach_type[1]) and $cnt_attach_link == 1) {
                 $domain_url_name = explode('/', $attach_type[1]);
                 $rdomain_url_name = str_replace('http://', '', $domain_url_name[2]);
                 $rImgUrl = $attach_type[4];
                 $rImgUrl = str_replace("\\", "/", $rImgUrl);
                 $img_name_arr = explode(".", $rImgUrl);
                 $img_format = totranslit(end($img_name_arr));
                 $image_name = substr(md5($server_time . md5($rImgUrl)), 0, 15);
                 //Разришенные форматы
                 $allowed_files = array('jpg', 'jpeg', 'jpe', 'png', 'gif');
                 //Загружаем картинку на сайт
                 if (in_array(strtolower($img_format), $allowed_files) and preg_match("/http:\\/\\/(.*?)(.jpg|.png|.gif|.jpeg|.jpe)/i", $rImgUrl)) {
                     //Директория загрузки фото
                     $upload_dir = ROOT_DIR . '/uploads/attach/' . $user_id;
                     //Если нет папки юзера, то создаём её
                     if (!is_dir($upload_dir)) {
                         @mkdir($upload_dir, 0777);
                         @chmod($upload_dir, 0777);
                     }
                     //Подключаем класс для фотографий
                     include ENGINE_DIR . '/classes/images.php';
                     if (@copy($rImgUrl, $upload_dir . '/' . $image_name . '.' . $img_format)) {
开发者ID:BGCX067,项目名称:facestor-svn-to-git,代码行数:31,代码来源:groups.php


示例8: trim

     $short_story = $db->safesql($parse->BB_Parse($parse->process($_POST['short_story']), false));
     $allow_br = 1;
 }
 if ($parse->not_allowed_text) {
     $stop .= "<li>" . $lang['news_err_39'] . "</li>";
 }
 $title = $db->safesql($parse->process(trim(strip_tags($_POST['title']))));
 $alt_name = trim($parse->process(stripslashes($_POST['alt_name'])));
 $add_module = "yes";
 $xfieldsaction = "init";
 $category = $catlist;
 include ENGINE_DIR . '/inc/xfields.php';
 if ($alt_name == "" or !$alt_name) {
     $alt_name = totranslit(stripslashes($title), true, false);
 } else {
     $alt_name = totranslit($alt_name, true, false);
 }
 if ($title == "" or !$title) {
     $stop .= $lang['add_err_1'];
 }
 if (dle_strlen($title, $config['charset']) > 200) {
     $stop .= $lang['add_err_2'];
 }
 if ($config['create_catalog']) {
     $catalog_url = $db->safesql(dle_substr(htmlspecialchars(strip_tags(stripslashes(trim($title))), ENT_QUOTES, $config['charset']), 0, 1, $config['charset']));
 } else {
     $catalog_url = "";
 }
 if ($user_group[$member_id['user_group']]['disable_news_captcha'] and $member_id['news_num'] >= $user_group[$member_id['user_group']]['disable_news_captcha']) {
     $user_group[$member_id['user_group']]['news_question'] = false;
     $user_group[$member_id['user_group']]['news_sec_code'] = false;
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:addnews.php


示例9: header

         header("Location: {$_SERVER['REQUEST_URI']}");
     }
 }
 if ($_POST['banned']) {
     $banned = "yes";
 }
 if (!$user_group[$editlevel]['time_limit']) {
     $time_limit = "";
 }
 $image = $_FILES['image']['tmp_name'];
 $image_name = $_FILES['image']['name'];
 $image_size = $_FILES['image']['size'];
 $img_name_arr = explode(".", $image_name);
 $type = totranslit(end($img_name_arr));
 if ($image_name != "") {
     $image_name = totranslit(stripslashes($img_name_arr[0])) . "." . $type;
 }
 if (stripos($image_name, "php") !== false) {
     die("Hacking attempt!");
 }
 if (is_uploaded_file($image)) {
     if ($image_size < 100000) {
         $allowed_extensions = array("jpg", "png", "jpe", "jpeg", "gif");
         if (in_array($type, $allowed_extensions) and $image_name) {
             include_once ENGINE_DIR . '/classes/thumb.class.php';
             $res = @move_uploaded_file($image, ROOT_DIR . "/uploads/fotos/" . $id . "." . $type);
             if ($res) {
                 @chmod(ROOT_DIR . "/uploads/fotos/" . $id . "." . $type, 0666);
                 $thumb = new thumbnail(ROOT_DIR . "/uploads/fotos/" . $id . "." . $type);
                 if ($thumb->size_auto($user_group[$member_id['user_group']]['max_foto'])) {
                     $thumb->jpeg_quality($config['jpeg_quality']);
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:editusers.php


示例10: check_filename

 private function check_filename($filename)
 {
     if ($filename != "") {
         $filename = str_replace("\\", "/", $filename);
         $filename = str_replace("..", "", $filename);
         $filename = str_replace("/", "", $filename);
         $filename_arr = explode(".", $filename);
         $type = totranslit(end($filename_arr));
         $curr_key = key($filename_arr);
         unset($filename_arr[$curr_key]);
         $filename = totranslit(implode(".", $filename_arr), false) . "." . $type;
     } else {
         return false;
     }
     $filename = str_replace("..", ".", $filename);
     $filename = str_ireplace("php", "", $filename);
     if (stripos($filename, "php") !== false) {
         return false;
     }
     if (stripos($filename, "phtm") !== false) {
         return false;
     }
     if (stripos($filename, "shtm") !== false) {
         return false;
     }
     if (stripos($filename, ".htaccess") !== false) {
         return false;
     }
     if (stripos($filename, ".cgi") !== false) {
         return false;
     }
     if (stripos($filename, ".html") !== false) {
         return false;
     }
     if (stripos($filename, ".ini") !== false) {
         return false;
     }
     if (stripos($filename, ".") === 0) {
         return false;
     }
     if (stripos($filename, ".") === false) {
         return false;
     }
     return $filename;
 }
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:45,代码来源:upload.class.php


示例11: sub_load_template

 function sub_load_template($tpl_name)
 {
     $tpl_name = str_replace(chr(0), '', $tpl_name);
     $url = @parse_url($tpl_name);
     $file_path = dirname($this->clear_url_dir($url['path']));
     $tpl_name = pathinfo($url['path']);
     $tpl_name = totranslit($tpl_name['basename']);
     $type = explode(".", $tpl_name);
     $type = strtolower(end($type));
     if ($type != "tpl") {
         return "Not Allowed Template Name: " . $tpl_name;
     }
     if ($file_path and $file_path != ".") {
         $tpl_name = $file_path . "/" . $tpl_name;
     }
     if (strpos($tpl_name, '/templates/') === 0) {
         $tpl_name = str_replace('/templates/', '', $tpl_name);
         $templatefile = ROOT_DIR . '/templates/' . $tpl_name;
     } else {
         $templatefile = $this->dir . "/" . $tpl_name;
     }
     if ($tpl_name == '' || !file_exists($templatefile)) {
         $templatefile = str_replace(ROOT_DIR, '', $templatefile);
         return "Template not found: " . $templatefile;
         return false;
     }
     if (stripos($templatefile, ".php") !== false) {
         return "Not Allowed Template Name: " . $tpl_name;
     }
     $template = file_get_contents($templatefile);
     $template = $this->check_module($template);
     if (strpos($template, "[group=") !== false or strpos($template, "[not-group=") !== false) {
         $template = $this->check_group($template);
     }
     if (strpos($template, "[page-count=") !== false) {
         $template = preg_replace_callback("#\\[(page-count)=(.+?)\\](.*?)\\[/page-count\\]#is", array(&$this, 'check_page'), $template);
     }
     if (strpos($template, "[not-page-count=") !== false) {
         $template = preg_replace_callback("#\\[(not-page-count)=(.+?)\\](.*?)\\[/not-page-count\\]#is", array(&$this, 'check_page'), $template);
     }
     if (strpos($template, "[tags=") !== false) {
         $template = preg_replace_callback("#\\[(tags)=(.+?)\\](.*?)\\[/tags\\]#is", array(&$this, 'check_tag'), $template);
     }
     if (strpos($template, "[not-tags=") !== false) {
         $template = preg_replace_callback("#\\[(not-tags)=(.+?)\\](.*?)\\[/not-tags\\]#is", array(&$this, 'check_tag'), $template);
     }
     if (strpos($template, "[news=") !== false) {
         $template = preg_replace_callback("#\\[(news)=(.+?)\\](.*?)\\[/news\\]#is", array(&$this, 'check_tag'), $template);
     }
     if (strpos($template, "[not-news=") !== false) {
         $template = preg_replace_callback("#\\[(not-news)=(.+?)\\](.*?)\\[/not-news\\]#is", array(&$this, 'check_tag'), $template);
     }
     if (strpos($template, "[smartphone]") !== false) {
         $template = preg_replace_callback("#\\[(smartphone)\\](.*?)\\[/smartphone\\]#is", array(&$this, 'check_device'), $template);
     }
     if (strpos($template, "[not-smartphone]") !== false) {
         $template = preg_replace_callback("#\\[(not-smartphone)\\](.*?)\\[/not-smartphone\\]#is", array(&$this, 'check_device'), $template);
     }
     if (strpos($template, "[tablet]") !== false) {
         $template = preg_replace_callback("#\\[(tablet)\\](.*?)\\[/tablet\\]#is", array(&$this, 'check_device'), $template);
     }
     if (strpos($template, "[not-tablet]") !== false) {
         $template = preg_replace_callback("#\\[(not-tablet)\\](.*?)\\[/not-tablet\\]#is", array(&$this, 'check_device'), $template);
     }
     if (strpos($template, "[desktop]") !== false) {
         $template = preg_replace_callback("#\\[(desktop)\\](.*?)\\[/desktop\\]#is", array(&$this, 'check_device'), $template);
     }
     if (strpos($template, "[not-desktop]") !== false) {
         $template = preg_replace_callback("#\\[(not-desktop)\\](.*?)\\[/not-desktop\\]#is", array(&$this, 'check_device'), $template);
     }
     return $template;
 }
开发者ID:Gordondalos,项目名称:union,代码行数:72,代码来源:templates.class.php


示例12: time

$PHP_SELF = $_SERVER['PHP_SELF'];
$_IP = $db->safesql($_SERVER['REMOTE_ADDR']);
$_TIME = time() + $config['date_adjust'] * 60;
require_once ENGINE_DIR . '/skins/default.skin.php';
if (isset($_POST['action'])) {
    $action = $_POST['action'];
} else {
    $action = $_GET['action'];
}
if (isset($_POST['mod'])) {
    $mod = $_POST['mod'];
} else {
    $mod = $_GET['mod'];
}
$mod = totranslit($mod, true, false);
$action = totranslit($action, false, false);
$user_group = get_vars("usergroup");
if (!$user_group) {
    $user_group = array();
    $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC");
    while ($row = $db->get_row()) {
        $user_group[$row['id']] = array();
        foreach ($row as $key => $value) {
            $user_group[$row['id']][$key] = stripslashes($value);
        }
    }
    set_vars("usergroup", $user_group);
    $db->free();
}
$cat_info = get_vars("category");
if (!is_array($cat_info)) {
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:init.php


示例13: values

    $db->query("INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('" . $db->safesql($member_id['name']) . "', '{$_TIME}', '{$_IP}', '4', '{$banner_tag}')");
    clear_cache();
    header("Location: " . $_SERVER['PHP_SELF'] . "?mod=banners");
}
if ($_POST['action'] == "doedit") {
    if ($_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash) {
        die("Hacking attempt! User not found");
    }
    if (!$id) {
        msg("error", "ID not valid", "ID not valid");
    }
    if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) {
        $_POST['banner_descr'] = stripslashes($_POST['banner_descr']);
        $_POST['banner_code'] = stripslashes($_POST['banner_code']);
    }
    $banner_tag = totranslit(strip_tags(trim($_POST['banner_tag'])));
    $banner_descr = $db->safesql(strip_tags(trim($_POST['banner_descr'])));
    $banner_code = $db->safesql(trim($_POST['banner_code']));
    $approve = intval($_REQUEST['approve']);
    $short_place = intval($_REQUEST['short_place']);
    $bstick = intval($_REQUEST['bstick']);
    $main = intval($_REQUEST['main']);
    $fpage = intval($_REQUEST['fpage']);
    $category = $_POST['category'];
    if (!count($category)) {
        $category = array();
        $category[] = '0';
    }
    $category_list = array();
    foreach ($category as $value) {
        $category_list[] = intval($value);
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:banners.php


示例14: elseif

} elseif ($action == "doedit") {
    if ($_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash) {
        die("Hacking attempt! User not found");
    }
    $quotes = array("'", "\"", "`", "\t", "\n", "\r", '"');
    $cat_name = $db->safesql(htmlspecialchars(strip_tags(stripslashes($_POST['cat_name'])), ENT_QUOTES));
    $skin_name = trim(totranslit($_POST['skin_name'], false, false));
    $cat_icon = $db->safesql(htmlspecialchars(strip_tags(stripslashes($_POST['cat_icon'])), ENT_QUOTES));
    $alt_cat_name = totranslit(stripslashes($_POST['alt_cat_name']), true, false);
    $catid = intval($_POST['catid']);
    $parentid = intval($_POST['parentid']);
    $meta_title = $db->safesql(htmlspecialchars(strip_tags(stripslashes($_POST['meta_title']))));
    $description = $db->safesql(dle_substr(strip_tags(stripslashes($_POST['descr'])), 0, 200, $config['charset']));
    $keywords = $db->safesql(str_replace($quotes, " ", strip_tags(stripslashes($_POST['keywords']))));
    $short_tpl = totranslit(stripslashes(trim($_POST['short_tpl'])));
    $full_tpl = totranslit(stripslashes(trim($_POST['full_tpl'])));
    if (in_array($_POST['news_sort'], array("date", "rating", "news_read", "title"))) {
        $news_sort = $db->safesql($_POST['news_sort']);
    } else {
        $news_sort = "";
    }
    if (in_array($_POST['news_msort'], array("ASC", "DESC"))) {
        $news_msort = $db->safesql($_POST['news_msort']);
    } else {
        $news_msort = "";
    }
    if ($_POST['news_number'] > 0) {
        $news_number = intval($_POST['news_number']);
    } else {
        $news_number = 0;
    }
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:categories.php


示例15: msg

 $short_story = $parse->process($_POST['short_story']);
 if ($config['allow_admin_wysiwyg'] or $allow_br != '1') {
     $full_story = $db->safesql($parse->BB_Parse($full_story));
     $short_story = $db->safesql($parse->BB_Parse($short_story));
 } else {
     $full_story = $db->safesql($parse->BB_Parse($full_story, false));
     $short_story = $db->safesql($parse->BB_Parse($short_story, false));
 }
 if ($parse->not_allowed_text) {
     msg("error", $lang['addnews_error'], $lang['news_err_39'], "javascript:history.go(-1)");
 }
 $alt_name = $_POST['alt_name'];
 if (trim($alt_name) == "" or !$alt_name) {
     $alt_name = totranslit(stripslashes($title), true, false);
 } else {
     $alt_name = totranslit(stripslashes($alt_name), true, false);
 }
 $title = $db->safesql($title);
 $metatags = create_metatags($short_story . $full_story);
 $catalog_url = $db->safesql(dle_substr(htmlspecialchars(strip_tags(stripslashes(trim($_POST['catalog_url']))), ENT_QUOTES, $config['charset']), 0, 3, $config['charset']));
 if ($config['create_catalog'] and !$catalog_url) {
     $catalog_url = $db->safesql(dle_substr(htmlspecialchars(strip_tags(stripslashes(trim($title))), ENT_QUOTES, $config['charset']), 0, 1, $config['charset']));
 }
 if (@preg_match("/[\\||\\<|\\>|\"|\\!|\\?|\$|\\@|\\/|\\\\|\\&\\~\\*\\+]/", $_POST['tags'])) {
     $_POST['tags'] = "";
 } else {
     $_POST['tags'] = @$db->safesql(htmlspecialchars(strip_tags(stripslashes(trim($_POST['tags']))), ENT_COMPAT, $config['charset']));
 }
 if ($_POST['tags']) {
     $temp_array = array();
     $tags_array = array();
开发者ID:Banych,项目名称:SiteCreate,代码行数:31,代码来源:addnews.php


示例16: msgbox

    if (!isset($xfieldsindex)) {
        msgbox('Информация', 'Выберите поле, которое хотите сдвинуть!', 'javascript:history.go(-1)');
        exit;
    }
    array_move($xfields, $xfieldsindex, +1);
    @profilesave($xfields);
}
//**************** Редактирование поля ****************** //
if ($_GET['act'] == 'edit') {
    $xfieldsindex = intval($_GET['id']);
    $editedxfield = $xfields[$xfieldsindex];
    //**************** Если нажали кнопку "Сохранить" ****************** //
    if (isset($_POST['edit_save'])) {
        $editedxfield = $_POST['editedxfield'];
        if (strlen(trim($editedxfield[0])) > 0 and strlen(trim($editedxfield[1])) > 0) {
            $editedxfield[0] = totranslit(trim($editedxfield[0]));
            $editedxfield[0] = str_replace('-', '_', $editedxfield[0]);
            $editedxfield[1] = htmlspecialchars(trim($editedxfield[1]));
            foreach ($xfields as $name => $value) {
                if ($name != $xfieldsindex and $value[0] == $editedxfield[0]) {
                    msgbox('Информация', 'Полe с таким названием уже существует!', 'javascript:history.go(-1)');
                    exit;
                }
            }
            if ($editedxfield[3] == "select") {
                $options = array();
                foreach (explode("\r\n", $editedxfield["6_select"]) as $name => $value) {
                    $value = trim($value);
                    if (!in_array($value, $options)) {
                        $options[] = $value;
                    }
开发者ID:BGCX067,项目名称:facestor-svn-to-git,代码行数:31,代码来源:xfields.php


示例17: define

@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE);
define('DATALIFEENGINE', true);
define('ROOT_DIR', substr(dirname(__FILE__), 0, -12));
define('ENGINE_DIR', ROOT_DIR . '/engine');
include ENGINE_DIR . '/data/config.php';
date_default_timezone_set($config['date_adjust']);
if ($config['http_home_url'] == "") {
    $config['http_home_url'] = explode("engine/ajax/rating.php", $_SERVER['PHP_SELF']);
    $config['http_home_url'] = reset($config['http_home_url']);
    $config['http_home_url'] = "http://" . $_SERVER['HTTP_HOST'] . $config['http_home_url'];
}
require_once ENGINE_DIR . '/classes/mysql.php';
require_once ENGINE_DIR . '/data/dbconfig.php';
require_once ENGINE_DIR . '/modules/functions.php';
dle_session();
$_REQUEST['skin'] = totranslit($_REQUEST['skin'], false, false);
if ($_REQUEST['skin']) {
    if (@is_dir(ROOT_DIR . '/templates/' . $_REQUEST['skin'])) {
        $config['skin'] = $_REQUEST['skin'];
    } else {
        die("Hacking attempt!");
    }
}
if ($config["lang_" . $config['skin']]) {
    if (file_exists(ROOT_DIR . '/language/' . $config["lang_" . $config['skin']] . '/website.lng')) {
        include_once ROOT_DIR . '/language/' . $config["lang_" . $config['skin']] . '/website.lng';
    } else {
        die("Language file not found");
    }
} else {
    include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng';
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:ratingcomments.php


示例18: totranslit

                 } else {
                     $stop .= $lang['news_err_14'];
                 }
             } else {
                 $stop .= $lang['news_err_15'];
             }
         } else {
             $stop .= $lang['news_err_16'];
         }
     } else {
         $stop .= $lang['news_err_32'];
     }
     @unlink(ROOT_DIR . "/uploads/fotos/" . $row['user_id'] . "." . $type);
 }
 if ($_POST['del_foto'] == "yes" and !$stop) {
     @unlink(ROOT_DIR . "/uploads/fotos/" . totranslit($row['foto']));
     $db->query("UPDATE " . USERPREFIX . "_users set foto='' WHERE user_id = '{$id}'");
 }
 if (strlen($password1) > 0) {
     $altpass = md5($altpass);
     if ($altpass != $member_id['password']) {
         $stop .= $lang['news_err_17'];
     }
     if ($password1 != $password2) {
         $stop .= $lang['news_err_18'];
     }
     if (strlen($password1) < 6) {
         $stop .= $lang['news_err_19'];
     }
     if ($member_id['user_id'] == $row['user_id'] and $user_group[$member_id['user_group']]['admin_editusers']) {
         $stop .= $lang['news_err_42'];
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:profile.php


示例19: foreach

 foreach ($_POST['content'] as $content) {
     $approve = intval($content['approve']);
     if (!count($content['category'])) {
         $content['category'] = array();
         $content['category'][] = '0';
     }
     $category_list = array();
     foreach ($content['category'] as $value) {
         $category_list[] = intval($value);
     }
     $category_list = $db->safesql(implode(',', $category_list));
     $full_story = $parse->process($content['full']);
     $short_story = $parse->process($content['short']);
     $title = $parse->process(trim(strip_tags($content['title'])));
     $_POST['title'] = $title;
     $alt_name = totranslit(stripslashes($title));
     $title = $db->safesql($title);
     if (!$allow_br) {
         $full_story = $db->safesql($parse->BB_Parse($full_story));
         $short_story = $db->safesql($parse->BB_Parse($short_story));
     } else {
         $full_story = $db->safesql($parse->BB_Parse($full_story, false));
         $short_story = $db->safesql($parse->BB_Parse($short_story, false));
     }
     $metatags = create_metatags($short_story . $full_story);
     $thistime = date("Y-m-d H:i:s", strtotime($content['date']));
     if (trim($title) == "") {
         msg("error", $lang['addnews_error'], $lang['addnews_ertitle'], "javascript:history.go(-1)");
     }
     if (trim($short_story) == "") {
         msg("error", $lang['addnews_error'], $lang['addnews_erstory'], "javascript:history.go(-1)");
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:rss.php


示例20: reset_url

    $_SERVER['HTTP_REFERER'] = reset_url($_SERVER['HTTP_REFERER']);
    $_SERVER['HTTP_HOST'] = reset_url($_SERVER['HTTP_HOST']);
    if ($_SERVER['HTTP_HOST'] != $_SERVER['HTTP_REFERER']) {
        @header('Location: ' . $config['http_home_url']);
        die("Access denied!!!<br /><br />Please visit <a href=\"{$config['http_home_url']}\">{$config['http_home_url']}</a>");
    }
}
$id = intval($_REQUEST['id']);
if ($_REQUEST['area'] == "static") {
    $row = $db->super_query("SELECT name, onserver FROM " . PREFIX . "_static_files WHERE id ='{$id}'");
} else {
    $row = $db->super_query("SELECT name, onserver FROM " . PREFIX . "_files WHERE id ='{$id}'");
}
if (!$row) {
    die("Access denied");
}
$config['files_max_speed'] = intval($config['files_max_speed']);
$row['onserver'] = totranslit($row['onserver'], false);
$file = new download(FILE_DIR . $row['onserver'], $row['name'], $config['files_force'], $config['files_max_speed']);
if ($_REQUEST['area'] == "static") {
    if ($config['files_count'] == "yes" and !$file->range) {
        $db->query("UPDATE " . PREFIX . "_static_files SET dcount=dcount+1 WHERE id ='{$id}'");
    }
} else {
    if ($config['files_count'] == "yes" and !$file->range) {
        $db->query("UPDATE " . PREFIX . "_files SET dcount=dcount+1 WHERE id ='{$id}'");
    }
}
$db->close();
session_write_close();
$file->download_file();
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:download.php



注:本文中的totranslit函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP touch函数代码示例发布时间:2022-05-23
下一篇:
PHP total_price函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap