本文整理汇总了PHP中cs_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_icon函数的具体用法?PHP cs_icon怎么用?PHP cs_icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cs_icon函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUserIcons
function getUserIcons($cs_lang, $users_id, $nick, $hidden = 0, $email = 0, $icq = 0, $jabber = 0, $url = 0, $skype = 0)
{
global $account;
$allow = $users_id == $account['users_id'] or $account['access_users'] > 4 ? 1 : 0;
$hidden = explode(',', $hidden);
if (in_array('users_email', $hidden) && empty($allow)) {
$email = '';
}
if (in_array('users_icq', $hidden) && empty($allow)) {
$icq = '';
}
if (in_array('users_jabber', $hidden) && empty($allow)) {
$jabber = '';
}
if (in_array('users_skype', $hidden) && empty($allow)) {
$skype = '';
}
if (in_array('users_url', $hidden) && empty($allow)) {
$url = '';
}
$icons = '';
$icons .= !empty($email) ? cs_html_mail($email, cs_icon('mail_generic')) : '';
$icons .= $account['access_users'] >= 2 ? cs_link(cs_icon('mail_send'), 'messages', 'create', 'to_id=' . $users_id, 0, $cs_lang['send_message']) : '';
$icons .= !empty($icq) ? cs_html_link('http://www.icq.com/people/' . $icq, cs_icon('licq'), 1, 0, $cs_lang['icq']) : '';
$icons .= !empty($jabber) ? cs_html_jabbermail($jabber, cs_icon('jabber_protocol')) : '';
$icons .= !empty($skype) ? cs_html_link('skype:' . $skype . '?userinfo', cs_html_img('http://mystatus.skype.com/smallicon/' . $skype, '16', '16', '0', 'Skype'), 0, 0, $cs_lang['skype']) : '';
$icons .= !empty($url) ? cs_html_link('http://' . $url, cs_icon('gohome'), 1, 0, $cs_lang['homepage']) : '';
return $icons;
}
示例2: cs_manage
function cs_manage($mod, $action, $def_mod, $def_action, $merge = array(), $head = array())
{
global $account, $cs_lang;
$merge = is_array($merge) ? $merge : array();
$show = $mod . '/' . $action;
if (empty($head['message'])) {
$head['message'] = '';
}
$data = array('head' => $head);
$data['content'] = array();
$options = array('info' => 0, 'size' => 48, 'theme' => '');
$options['theme'] = empty($account['users_view']) ? 'manage' : 'manage_' . $account['users_view'];
if ($account['users_view'] == 'list') {
$options['size'] = 16;
if ($show == 'clansphere/admin') {
$options['theme'] = 'manage_admin';
$options['info'] = 1;
}
}
$mod_array = cs_checkdirs('mods', $show);
$content = array_merge($merge, $mod_array);
ksort($content);
$loop = 0;
foreach ($content as $mod) {
if (!array_key_exists('dir', $mod)) {
$mod['dir'] = $def_mod;
}
if (!array_key_exists('file', $mod)) {
$mod['file'] = $def_action;
}
$acc_dir = 'access_' . $mod['dir'];
if (array_key_exists($acc_dir, $account) and $account[$acc_dir] >= $mod['show'][$show]) {
$cs_lap = cs_icon($mod['icon'], $options['size'], 0, 0);
$data['content'][$loop]['img_1'] = $cs_lap;
$data['content'][$loop]['txt_1'] = $mod['name'];
$data['content'][$loop]['link_1'] = cs_url($mod['dir'], $mod['file']);
if (!empty($options['info'])) {
if (file_exists('mods/' . $mod['dir'] . '/create.php')) {
$data['content'][$loop]['create_1'] = cs_link(cs_icon('editpaste', 16, $cs_lang['create']), $mod['dir'], 'create');
} else {
$data['content'][$loop]['create_1'] = '';
}
if (file_exists('mods/' . $mod['dir'] . '/manage.php')) {
$data['content'][$loop]['manage_1'] = cs_link(cs_icon('kfm', 16, $cs_lang['manage']), $mod['dir'], 'manage');
} else {
$data['content'][$loop]['manage_1'] = '';
}
if (file_exists('mods/' . $mod['dir'] . '/options.php')) {
$data['content'][$loop]['options_1'] = cs_link(cs_icon('package_settings', 16, $cs_lang['options']), $mod['dir'], 'options');
} else {
$data['content'][$loop]['options_1'] = '';
}
}
$loop++;
}
}
$data['head']['total'] = $loop;
return cs_subtemplate(__FILE__, $data, 'clansphere', $options['theme']);
}
示例3: cs_datacontrol
function cs_datacontrol($data_id, $div = 0, $style = '', $more = '')
{
global $cs_main, $cs_lang, $account;
$content = '';
$mod = $cs_main['mod'];
$get_axx = 'mods/' . $mod . '/access.php';
$axx_file = array();
include $get_axx;
if (!empty($div)) {
$content .= '<div style="' . $style . '" ' . $more . '>';
}
if ($account['access_' . $mod] >= $axx_file['edit']) {
$img_edit = cs_icon('edit', 16, $cs_lang['edit']);
$content .= cs_link($img_edit, $mod, 'edit', 'id=' . $data_id, 0, $cs_lang['edit']);
}
if ($account['access_' . $mod] >= $axx_file['remove']) {
$img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
$content .= cs_link($img_del, $mod, 'remove', 'id=' . $data_id, 0, $cs_lang['remove']);
}
if (!empty($div)) {
$content .= '</div>';
}
return $content;
}
示例4: empty
$gbook[$run]['icon_icq'] = empty($icq) ? '' : cs_html_link("http://www.icq.com/{$icq}", cs_icon('licq'));
$jabber = cs_secure($cs_gbook[$run]['users_jabber']);
if (in_array('users_jabber', $hidden)) {
$jabber = empty($allow) ? '' : $jabber;
}
$gbook[$run]['icon_jabber'] = empty($jabber) ? '' : cs_html_jabbermail($jabber, cs_icon('jabber_protocol'));
$skype = cs_secure($cs_gbook[$run]['users_skype']);
$url = 'http://mystatus.skype.com/smallicon/' . $skype;
$skype = cs_html_link('skype:' . $cs_gbook[$run]['users_skype'] . '?userinfo', cs_html_img($url, '16', '16', '0', 'Skype'), '0');
if (in_array('users_skype', $hidden)) {
$skype = empty($allow) ? '' : $skype;
}
$gbook[$run]['icon_skype'] = empty($cs_gbook[$run]['users_skype']) ? '' : $skype;
$url = cs_secure($cs_gbook[$run]['users_url']);
if (in_array('users_url', $hidden)) {
$url = empty($allow) ? '' : $url;
}
$gbook[$run]['icon_url'] = empty($url) ? '' : cs_html_link("http://{$url}", cs_icon('gohome'));
}
$gbook[$run]['text'] = cs_secure($cs_gbook[$run]['gbook_text'], 1, 1);
$gbook[$run]['time'] = cs_date('unix', $cs_gbook[$run]['gbook_time'], 1);
if ($cs_gbook[$run]['gbook_lock'] == 0) {
$gbook[$run]['class'] = 'notpublic';
$gbook[$run]['de_activate'] = cs_link(cs_icon('submit'), 'gbook', 'center', 'unhide=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['unhide']);
} else {
$gbook[$run]['class'] = '';
$gbook[$run]['de_activate'] = cs_link(cs_icon('editcut'), 'gbook', 'center', 'hide=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['hide']);
}
}
$data['gbook'] = !empty($gbook) ? $gbook : '';
echo cs_subtemplate(__FILE__, $data, 'gbook', 'center');
示例5: elseif
if (!empty($surname) and !empty($name)) {
$data['eventguests'][$run]['name'] = $surname . ', ' . $name;
} elseif (!empty($surname) or !empty($name)) {
$data['eventguests'][$run]['name'] = $surname . $name;
} else {
$data['eventguests'][$run]['name'] = '';
}
if (empty($cs_eventguests[$run]['eventguests_phone'])) {
if (in_array('users_phone', $hidden)) {
$cs_eventguests[$run]['eventguests_phone'] = empty($allow) ? '' : cs_html_italic(1) . $cs_eventguests[$run]['users_phone'] . cs_html_italic(0);
} elseif (!empty($allow)) {
$cs_eventguests[$run]['eventguests_phone'] = $cs_eventguests[$run]['users_phone'];
}
}
if (empty($cs_eventguests[$run]['eventguests_mobile'])) {
if (in_array('users_mobile', $hidden)) {
$cs_eventguests[$run]['eventguests_mobile'] = empty($allow) ? '' : cs_html_italic(1) . $cs_eventguests[$run]['users_mobile'] . cs_html_italic(0);
} elseif (!empty($allow)) {
$cs_eventguests[$run]['eventguests_mobile'] = $cs_eventguests[$run]['users_mobile'];
}
}
$data['eventguests'][$run]['user'] = empty($cs_eventguests[$run]['users_id']) ? '-' : cs_user($cs_eventguests[$run]['users_id'], $cs_eventguests[$run]['users_nick'], $cs_eventguests[$run]['users_active'], $cs_eventguests[$run]['users_delete']);
$data['eventguests'][$run]['since'] = cs_date('unix', $cs_eventguests[$run]['eventguests_since']);
$data['eventguests'][$run]['phone'] = empty($cs_eventguests[$run]['eventguests_phone']) ? ' ' : cs_html_img('symbols/' . $cs_main['img_path'] . '/16/linphone.' . $cs_main['img_ext'], 16, 16, 'title="' . $cs_eventguests[$run]['eventguests_phone'] . '"');
$data['eventguests'][$run]['mobile'] = empty($cs_eventguests[$run]['eventguests_mobile']) ? ' ' : cs_html_img('symbols/' . $cs_main['img_path'] . '/16/sms_protocol.' . $cs_main['img_ext'], 16, 16, 'title="' . $cs_eventguests[$run]['eventguests_mobile'] . '"');
$data['eventguests'][$run]['status'] = $cs_lang['status_' . $cs_eventguests[$run]['eventguests_status']];
$data['eventguests'][$run]['notice'] = empty($cs_eventguests[$run]['eventguests_notice']) ? ' ' : cs_icon('txt', 16, $cs_lang['notice']);
$data['eventguests'][$run]['edit'] = cs_link(cs_icon('edit', 16, $cs_lang['edit']), 'events', 'guestsadm', 'id=' . $cs_eventguests[$run]['eventguests_id'], 0, $cs_lang['edit']);
$data['eventguests'][$run]['remove'] = cs_link(cs_icon('editdelete', 16, $cs_lang['remove']), 'events', 'guestsdel', 'id=' . $cs_eventguests[$run]['eventguests_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'events', 'guests');
示例6: count
$sqd_loop = count($sqd_data);
for ($run = 0; $run < $sqd_loop; $run++) {
$data['squad'][$run]['selected'] = $sqd_data[$run]['squads_id'] == $squads_id ? ' selected="selected"' : '';
$data['squad'][$run]['id'] = $sqd_data[$run]['squads_id'];
$data['squad'][$run]['name'] = cs_secure($sqd_data[$run]['squads_name']);
}
if (empty($sqd_loop)) {
$data['squad'] = array();
}
$data['lang']['msg'] = !empty($msg) ? $msg : '';
$select = 'mem.members_admin AS members_admin, mem.members_order AS members_order, mem.users_id AS users_id, usr.users_nick AS users_nick, usr.users_delete AS users_delete, usr.users_active AS users_active, mem.members_task, mem.members_id AS members_id';
$from = 'members mem INNER JOIN {pre}_users usr ON mem.users_id = usr.users_id';
$where = "mem.squads_id = '" . $squads_id . "'";
$cs_members = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, 0);
$members_loop = count($cs_members);
$data['sort']['user'] = cs_sort('members', 'center', 0, $squads_id, 1, $sort);
$data['sort']['task'] = cs_sort('members', 'center', 0, $squads_id, 3, $sort);
$img_edit = cs_icon('edit', 16, $cs_lang['edit']);
$img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
if (empty($members_loop)) {
$data['members'] = '';
}
for ($run = 0; $run < $members_loop; $run++) {
$users_nick = cs_user($cs_members[$run]['users_id'], $cs_members[$run]['users_nick'], $cs_members[$run]['users_active'], $cs_members[$run]['users_delete']);
$data['members'][$run]['user'] = empty($cs_members[$run]['members_admin']) ? $users_nick : cs_html_big(1) . $users_nick . cs_html_big(0);
$data['members'][$run]['task'] = cs_secure($cs_members[$run]['members_task']);
$data['members'][$run]['order'] = $cs_members[$run]['members_order'];
$data['members'][$run]['edit'] = cs_link($img_edit, 'members', 'change', 'id=' . $cs_members[$run]['members_id'], 0, $cs_lang['edit']);
$data['members'][$run]['remove'] = cs_link($img_del, 'members', 'center', 'del_id=' . $cs_members[$run]['members_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'members', 'center');
示例7: cs_getmsg
function cs_getmsg()
{
if (!isset($_SESSION['message']) || empty($_SESSION['message'])) {
return '';
}
$data = array();
if (!empty($_SESSION['messageadd'])) {
$add = explode(',', $_SESSION['messageadd'], 2);
$data['msg']['icon'] = empty($add[0]) ? '' : cs_icon($add[0]);
$data['msg']['id'] = empty($add[1]) ? 'msg_normal' : $add[1];
unset($_SESSION['messageadd']);
} else {
$data['msg']['icon'] = '';
$data['msg']['id'] = 'msg_normal';
}
$data['msg']['text'] = $_SESSION['message'];
unset($_SESSION['message']);
return cs_subtemplate(__FILE__, $data, 'clansphere', 'message');
}
示例8: cs_link
$data['if']['wizard'] = TRUE;
$data['wizard']['roots'] = cs_link($cs_lang['show'], 'wizard', 'roots');
$data['wizard']['task_done'] = cs_link($cs_lang['task_done'], 'wizard', 'roots', 'handler=mods&done=1');
}
}
$cs_access = cs_sql_select(__FILE__, 'access', '*', 0, 0, 0, 0);
$groups = count($cs_access);
$run = 0;
foreach ($modules as $mod) {
$data['mod'][$run]['icon'] = empty($mod['icon']) ? '' : cs_icon($mod['icon']);
$data['mod'][$run]['name_url'] = empty($mod['name']) ? '' : cs_link($mod['name'], 'modules', 'view', 'dir=' . $mod['dir']);
$data['mod'][$run]['version'] = empty($mod['version']) ? '' : $mod['version'];
$data['mod'][$run]['released'] = empty($mod['released']) ? '' : cs_date('date', $mod['released']);
$listed = isset($cs_access[0]['access_' . $mod['dir']]) ? 1 : 0;
$access = 0;
if (!empty($listed)) {
for ($run2 = 0; $run2 < $groups; $run2++) {
$access += $cs_access[$run2]['access_' . $mod['dir']];
}
}
if (!empty($listed) && !empty($access) && empty($mod['protected'])) {
$data['mod'][$run]['protected'] = cs_link(cs_icon('gpg'), 'modules', 'deactivate', 'dir=' . $mod['dir'], '', $cs_lang['deactivate']);
} elseif (!empty($listed) && empty($mod['protected'])) {
$data['mod'][$run]['protected'] = cs_link(cs_icon('submit'), 'modules', 'accessedit', 'dir=' . $mod['dir'] . '&activate', '', $cs_lang['activate']);
} else {
$data['mod'][$run]['protected'] = '';
}
$data['mod'][$run]['access'] = empty($listed) ? '' : cs_link(cs_icon('access'), 'modules', 'accessedit', 'dir=' . $mod['dir'], '', $cs_lang['access']);
$run++;
}
echo cs_subtemplate(__FILE__, $data, 'modules', 'roots');
示例9: array
$cs_options['done_' . $handler . ''] = $save['done_' . $handler];
break;
}
}
}
$run = 0;
$done = 0;
$next = 0;
$next_task = '-';
$data = array('head' => array(), 'wizard' => array());
foreach ($task_array as $step) {
$data['wizard'][$run]['icon'] = cs_icon($step['icon'], 48);
$data['wizard'][$run]['link'] = cs_link($cs_lang['' . $step['handler'] . '_name'], $step['mod'], $step['action']);
$data['wizard'][$run]['text'] = $cs_lang['' . $step['handler'] . '_text'];
if (empty($cs_options['done_' . $step['handler'] . ''])) {
$next_task = empty($next) ? cs_link($cs_lang['' . $step['handler'] . '_name'], $step['mod'], $step['action']) : $next_task;
$data['wizard'][$run]['next'] = empty($next) ? '>> ' . $cs_lang['next_step'] . ' <<' : '';
$data['wizard'][$run]['done'] = cs_link(cs_icon('cancel'), 'wizard', 'roots', 'handler=' . $step['handler'] . '&done=1');
$data['wizard'][$run]['class'] = 'b';
$next++;
} else {
$data['wizard'][$run]['next'] = '';
$data['wizard'][$run]['done'] = cs_link(cs_icon('submit'), 'wizard', 'roots', 'handler=' . $step['handler'] . '&done=0');
$data['wizard'][$run]['class'] = 'c';
$done++;
}
$run++;
}
$data['head']['next_task'] = $cs_lang['next_step'] . ': ' . $next_task;
$data['head']['parts_done'] = sprintf($cs_lang['parts_done'], $done, $run);
echo cs_subtemplate(__FILE__, $data, 'wizard', 'roots');
示例10: cs_translate
}
$cs_lang_mod = cs_translate('modules', 1);
$cs_lang_acc = cs_translate('access', 1);
include 'mods/' . $dir . '/info.php';
$cs_lang = empty($cs_lang) ? array() : $cs_lang;
# combine translations of target info file with mods access and modules
$cs_lang = array_merge($cs_lang, $cs_lang_acc, $cs_lang_mod);
$data['mod']['name'] = $mod_info['name'];
$data['mod']['version'] = $mod_info['version'];
$data['mod']['released'] = cs_date('date', $mod_info['released']);
$data['mod']['protected'] = empty($mod_info['protected']) ? $cs_lang['no'] : $cs_lang['yes'];
$data['mod']['creator'] = $mod_info['creator'];
$data['mod']['team'] = $mod_info['team'];
$data['mod']['url'] = cs_html_link('http://' . $mod_info['url'], $mod_info['url']);
$data['mod']['icon_48'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon'], '48');
$data['mod']['icon_16'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon']);
$data['mod']['text'] = $mod_info['text'];
if (!empty($account['access_explorer'])) {
$data['if']['access_explorer'] = TRUE;
include_once 'mods/explorer/functions.php';
$more = 'dir=' . cs_explorer_path('mods/' . $dir, 'escape');
$data['extended']['link'] = cs_link($cs_lang['jump_to_explorer'], 'explorer', 'roots', $more);
}
if (file_exists('mods/' . $dir . '/access.php')) {
$sort = empty($_REQUEST['sort']) ? 2 : $_REQUEST['sort'];
$data['sort']['file'] = cs_sort('modules', 'view', 0, 0, 1, $sort, 'dir=' . $dir);
$data['sort']['access'] = cs_sort('modules', 'view', 0, 0, 3, $sort, 'dir=' . $dir);
$axx_file = array();
include 'mods/' . $dir . '/access.php';
switch ($sort) {
case 1:
示例11: cs_translate
$cs_lang = cs_translate('faq');
empty($_REQUEST['start']) ? $start = 0 : ($start = $_REQUEST['start']);
$cs_sort[1] = 'faq_question DESC';
$cs_sort[2] = 'faq_question ASC';
$cs_sort[3] = 'categories_id DESC';
$cs_sort[4] = 'categories_id ASC';
$sort = empty($_REQUEST['sort']) ? 4 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$faq_count = cs_sql_count(__FILE__, 'faq');
$data['lang']['count'] = $faq_count;
$data['pages']['list'] = cs_pages('faq', 'manage', $faq_count, $start, 0, $sort);
$data['lang']['getmsg'] = cs_getmsg();
$cs_faq = cs_sql_select(__FILE__, 'faq', '*', 0, $order, $start, $account['users_limit']);
$faq_loop = count($cs_faq);
$data['sort']['question'] = cs_sort('faq', 'manage', $start, 0, 1, $sort);
$data['sort']['category'] = cs_sort('faq', 'manage', $start, 0, 3, $sort);
if (empty($faq_loop)) {
$data['faq'] = '';
}
for ($run = 0; $run < $faq_loop; $run++) {
$data['faq'][$run]['question'] = cs_secure($cs_faq[$run]['faq_question']);
$cs_faq_user = cs_sql_select(__FILE__, 'users', 'users_nick, users_active, users_delete', "users_id = '" . $cs_faq[$run]['users_id'] . "'");
$data['faq'][$run]['user'] = cs_user($cs_faq[$run]['users_id'], $cs_faq_user['users_nick'], $cs_faq_user['users_active'], $cs_faq_user['users_delete']);
$cs_faq_categories = cs_sql_select(__FILE__, 'categories', '*', "categories_id = '" . $cs_faq[$run]['categories_id'] . "'");
$data['faq'][$run]['cat'] = cs_secure($cs_faq_categories['categories_name']);
$img_edit = cs_icon('edit');
$data['faq'][$run]['edit'] = cs_link($img_edit, 'faq', 'edit', 'id=' . $cs_faq[$run]['faq_id'], 0, $cs_lang['edit']);
$img_del = cs_icon('editdelete');
$data['faq'][$run]['remove'] = cs_link($img_del, 'faq', 'remove', 'id=' . $cs_faq[$run]['faq_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'faq', 'manage');
示例12: array
$data = array('trash' => array());
$data['status']['msg'] = '';
if (isset($_POST['submit'])) {
$domain = empty($_POST['blocklist_entry']) ? '' : trim($_POST['blocklist_entry']);
$exists = cs_sql_count(__FILE__, 'trashmail', 'trashmail_entry = \'' . cs_sql_escape($domain) . '\'');
if (!empty($domain) and empty($exists)) {
$trashmail_cells = array('trashmail_entry');
$trashmail_save = array($domain);
cs_sql_insert(__FILE__, 'trashmail', $trashmail_cells, $trashmail_save);
$data['status']['msg'] = cs_icon('submit') . ' ' . $cs_lang['blocklist_success'];
} else {
$data['status']['msg'] = cs_icon('error') . ' ' . $cs_lang['blocklist_exists'];
}
} elseif (!empty($_GET['delete'])) {
cs_sql_delete(__FILE__, 'trashmail', (int) $_GET['delete']);
$data['status']['msg'] = cs_icon('submit') . ' ' . $cs_lang['blocklist_delete'];
}
$data['if']['status'] = empty($data['status']['msg']) ? 0 : 1;
$start = empty($_GET['start']) ? 0 : (int) $_GET['start'];
$cs_sort[1] = 'trashmail_entry DESC';
$cs_sort[2] = 'trashmail_entry ASC';
$sort = empty($_GET['sort']) ? 2 : (int) $_GET['sort'];
$order = $cs_sort[$sort];
$trash_count = cs_sql_count(__FILE__, 'trashmail');
$select = 'trashmail_id, trashmail_entry';
$cs_trash = cs_sql_select(__FILE__, 'trashmail', $select, 0, $order, $start, $account['users_limit']);
$trash_loop = count($cs_trash);
$data['head']['pages'] = cs_pages('contact', 'blocklist', $trash_count, $start, 0, $sort);
$data['head']['sort_name'] = cs_sort('contact', 'blocklist', $start, 0, 1, $sort);
$data['head']['message'] = cs_getmsg();
for ($run = 0; $run < $trash_loop; $run++) {
示例13: array
# Check for MySQL version 4.1.8 or above due to charset / collation support
$data['if']['old_mysql'] = 0;
global $cs_db;
$ext_mysql = array('mysql', 'mysqli', 'pdo_mysql');
if (in_array($cs_db['type'], $ext_mysql)) {
$myv = explode('.', $sql_info['server']);
settype($myv[2], 'integer');
if ($myv[0] < 4 or $myv[0] == 4 and $myv[1] < 1 or $myv[0] == 4 and $myv[1] == 1 and $myv[2] < 8) {
$data['if']['old_mysql'] = 1;
}
}
# Define test result icons
$data['charset']['check_setup_file'] = empty($data['charset']['result_setup_file']) ? cs_icon('submit') : cs_icon('stop');
$data['charset']['check_tpl_setting'] = empty($data['charset']['result_tpl_setting']) ? cs_icon('submit') : cs_icon('stop');
$data['charset']['check_web_setting'] = empty($data['charset']['result_web_setting']) ? cs_icon('submit') : cs_icon('stop');
$data['charset']['check_sql_setting'] = empty($data['charset']['result_sql_setting']) ? cs_icon('submit') : cs_icon('stop');
# Add positive results to output variables
if (empty($data['charset']['result_setup_file'])) {
$data['charset']['result_setup_file'] = $cs_main['charset'];
}
if (empty($data['charset']['result_tpl_setting'])) {
foreach ($tpl_charset as $lowercase => $found) {
$data['charset']['result_tpl_setting'] .= $found . cs_html_br(1);
}
}
if (empty($data['charset']['result_web_setting'])) {
$data['charset']['result_web_setting'] = $web_charset;
}
if (empty($data['charset']['result_sql_setting'])) {
$data['charset']['result_sql_setting'] = $sql_info['encoding'];
}
示例14: cs_html_br
$error++;
$errormsg .= $cs_lang['error_email'] . cs_html_br(1);
}
if (!empty($mail['icq']) and !preg_match('#^[\\d-]*$#', $mail['icq'])) {
$error++;
$errormsg .= $cs_lang['error_icq'] . cs_html_br(1);
}
if (empty($mail['categories_id'])) {
$error++;
$errormsg .= $cs_lang['error_category'] . cs_html_br(1);
}
}
if (!isset($_POST['submit'])) {
$data['lang']['head'] = $cs_lang['body_mail'];
} elseif (!empty($error)) {
$data['lang']['head'] = cs_icon('important') . cs_html_br(1);
$data['lang']['head'] .= $errormsg;
} else {
$data['lang']['head'] = $cs_lang['success'];
}
if (!empty($error) or !isset($_POST['submit'])) {
$data['if']['form'] = TRUE;
$data['if']['done'] = FALSE;
$categories_data = cs_sql_select(__FILE__, 'categories', '*', "categories_mod = 'contact'", 'categories_order ASC, categories_name', 0, 0);
foreach ($mail as $key => $value) {
$data['mail'][$key] = cs_secure($value);
}
$data['mail']['categories_id'] = cs_dropdown('categories_id', 'categories_name', $categories_data, $mail['categories_id']);
if (!empty($captcha)) {
$data['if']['captcha'] = 1;
}
示例15: cs_sql_select
$id = (int) $_POST['messages_filter'] - 1;
$time = $messages_data[$id]['messages_time'];
$where .= " AND messages_time >= '" . $time . "'";
}
$from = 'messages msg INNER JOIN {pre}_users usr ON msg.users_id = usr.users_id';
$select = 'msg.messages_id AS messages_id, msg.messages_subject AS messages_subject, msg.messages_time AS messages_time, ';
$select .= 'msg.messages_view AS messages_view, msg.users_id_to AS users_id_to, msg.users_id AS users_id, usr.users_nick AS users_nick, usr.users_active AS users_active, ';
$select .= 'msg.messages_show_sender AS messages_show_sender,msg.messages_show_receiver AS messages_show_receviver, usr.users_delete AS users_delete';
$data['msgs'] = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$data['msgs'] = fetch_pm_period($data['msgs'], 'messages_time');
$count = fetch_pm_period_count($data['msgs']);
$messages_loop = count($data['msgs']);
$period = 0;
for ($i = 0; $i < $messages_loop; $i++) {
$data['msgs'][$i]['icon'] = empty($data['msgs'][$i]['messages_view']) ? cs_icon('email', 16, $cs_lang['new']) : cs_icon('mail_generic', 16, $cs_lang['read']);
if ($data['msgs'][$i]['messages_view'] == 2) {
$data['msgs'][$i]['icon'] = cs_icon('mail_replay', 16, $cs_lang['answered']);
}
$data['msgs'][$i]['messages_time'] = cs_date('unix', $data['msgs'][$i]['messages_time'], 1);
$data['msgs'][$i]['user_from'] = cs_user($data['msgs'][$i]['users_id'], $data['msgs'][$i]['users_nick'], $data['msgs'][$i]['users_active'], $data['msgs'][$i]['users_delete']);
$data['msgs'][$i]['messages_subject'] = cs_secure($data['msgs'][$i]['messages_subject']);
if ($data['msgs'][$i]['period'] === $period) {
$data['msgs'][$i]['if']['new_period'] = false;
} else {
$data['msgs'][$i]['if']['new_period'] = true;
$data['msgs'][$i]['period_name'] = $cs_lang[$data['msgs'][$i]['period']];
$data['msgs'][$i]['period_count'] = $count[$data['msgs'][$i]['period']];
$period = $data['msgs'][$i]['period'];
}
}
echo cs_subtemplate(__FILE__, $data, 'messages', 'inbox');