本文整理汇总了PHP中cs_html_br函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_html_br函数的具体用法?PHP cs_html_br怎么用?PHP cs_html_br使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cs_html_br函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cs_installerror
function cs_installerror($old_query = '')
{
global $cs_db, $cs_lang, $account;
$cs_lang = cs_translate('install');
$error = empty($cs_db['last_error']) ? 'Unknown' : $cs_db['last_error'];
$msg = 'Error: ' . $error . cs_html_br(2) . 'Query: ' . $old_query . cs_html_br(4);
$msg .= cs_link($cs_lang['remove_and_again'], 'install', 'sql', 'lang=' . $account['users_lang'] . '&uninstall=1');
die(cs_error_internal('sql', $msg));
}
示例2: cs_gray
function cs_gray($imgfile)
{
$info = getimagesize($imgfile);
switch ($info[2]) {
case 1:
$cs_lang = cs_translate('gallery');
$message = $cs_lang['gray_error'] . cs_html_br(1);
$g_error = 1;
break;
case 2:
$sourceImage = imagecreatefromjpeg($imgfile);
break;
case 3:
$sourceImage = imagecreatefrompng($imgfile);
break;
}
if (empty($g_error)) {
$img_width = imagesx($sourceImage);
$img_height = imagesy($sourceImage);
for ($y = 0; $y < $img_height; $y++) {
for ($x = 0; $x < $img_width; $x++) {
$rgb = imagecolorat($sourceImage, $x, $y);
$red = $rgb >> 16 & 0xff;
$green = $rgb >> 8 & 0xff;
$blue = $rgb & 0xff;
$gray = round(0.299 * $red + 0.587 * $green + 0.114 * $blue);
$grayR = $gray << 16;
// R: red
$grayG = $gray << 8;
// G: green
$grayB = $gray;
// B: blue
$grayColor = $grayR | $grayG | $grayB;
imagesetpixel($sourceImage, $x, $y, $grayColor);
imagecolorallocate($sourceImage, $gray, $gray, $gray);
}
}
$destinationImage = imagecreatetruecolor($img_width, $img_height);
imagecopy($destinationImage, $sourceImage, 0, 0, 0, 0, $img_width, $img_height);
switch ($info[2]) {
case 2:
return imagejpeg($destinationImage, $imgfile);
break;
case 3:
return imagepng($destinationImage, $imgfile);
break;
}
imagedestroy($destinationImage);
imagedestroy($sourceImage);
}
}
示例3: cs_datepost
if (isset($_POST['submit'])) {
$cs_members['members_task'] = $_POST['members_task'];
$cs_members['members_since'] = cs_datepost('since', 'date');
$cs_members['members_order'] = empty($_POST['members_order']) ? 1 : $_POST['members_order'];
$cs_members['members_admin'] = empty($_POST['members_admin']) ? 0 : $_POST['members_admin'];
$error = 0;
$errormsg = '';
if (empty($cs_members['members_task'])) {
$error++;
$errormsg .= $cs_lang['no_task'] . cs_html_br(1);
}
$where = "squads_id = '" . $cs_members['squads_id'] . "' AND users_id = '" . $account['users_id'] . "'";
$search_admin = cs_sql_select(__FILE__, 'members', 'members_admin', $where);
if (empty($search_admin['members_admin'])) {
$error++;
$errormsg .= $cs_lang['no_admin'] . cs_html_br(1);
}
}
if (!isset($_POST['submit'])) {
$data['lang']['body'] = $cs_lang['errors_here'];
} elseif (!empty($error)) {
$data['lang']['body'] = $errormsg;
}
if (!empty($error) or !isset($_POST['submit'])) {
$data['url']['form'] = cs_url('members', 'change');
$squad_match = "squads_id = '" . $cs_members['squads_id'] . "'";
$squad_infos = cs_sql_select(__FILE__, 'squads', 'squads_name,squads_id', $squad_match);
$squad_name = cs_secure($squad_infos['squads_name']);
$data['members']['squad'] = cs_link($squad_name, 'squads', 'view', 'id=' . $squad_infos['squads_id']);
$users_match = "users_id = '" . $cs_members['users_id'] . "'";
$users_infos = cs_sql_select(__FILE__, 'users', 'users_nick,users_id,users_active,users_delete', $users_match);
示例4: cs_html_br
$error++;
$errormsg .= $cs_lang['email_false'] . cs_html_br(1);
}
include_once 'mods/contact/trashmail.php';
if (cs_trashmail($cs_user['users_email'])) {
$error++;
$errormsg .= $cs_lang['email_false'] . cs_html_br(1);
}
if (!empty($cs_user['users_sex'])) {
$cs_user['users_sex'] = $cs_user['users_sex'] == 'male' ? 'male' : 'female';
}
$country = $cs_user['users_country'];
$cs_user['users_country'] = isset($cs_country[$country]) ? $cs_user['users_country'] : 'fam';
if ((int) $_POST['age_year'] . $_POST['age_month'] . $_POST['age_day'] > (int) cs_datereal('Ymd')) {
$error++;
$errormsg .= $cs_lang['age_false'] . cs_html_br(1);
}
} else {
$cells = 'users_nick, users_name, users_surname, users_sex, users_age, users_height, users_country, users_postalcode, users_place, users_adress, users_icq, users_jabber, users_skype, users_email, users_url, users_phone, users_mobile, users_info, users_hidden';
$cs_user = cs_sql_select(__FILE__, 'users', $cells, "users_id = '" . $account['users_id'] . "'");
$hidden = explode(',', $cs_user['users_hidden']);
}
if (!isset($_POST['submit'])) {
$data['users']['body'] = $cs_lang['errors_here'];
} elseif (!empty($error)) {
$data['users']['body'] = $errormsg;
} else {
$data['users']['body'] = $cs_lang['changes_done'];
}
if (!empty($error) or !isset($_POST['submit'])) {
$hidden = array_flip($hidden);
示例5: isset
$edit['usersgallery_vote'] = isset($_POST['gallery_vote']) ? $_POST['gallery_vote'] : 0;
if (!empty($_POST['new_time'])) {
$edit['usersgallery_time'] = cs_time();
}
if (!empty($_POST['gallery_count_reset'])) {
$edit['usersgallery_count'] = 0;
}
$error = '';
if ($edit['users_id'] != $account['users_id'] and $account['access_usersgallery'] < 4) {
$error .= $cs_lang['not_own'] . cs_html_br(1);
}
if (empty($edit['usersgallery_titel'])) {
$error .= $cs_lang['no_titel'] . cs_html_br(1);
}
if (empty($edit['folders_id'])) {
$error .= $cs_lang['no_cat'] . cs_html_br(1);
}
}
if (!isset($_POST['submit'])) {
$data['head']['body'] = $cs_lang['body_picture'];
} elseif (!empty($error)) {
$data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
$data['data'] = $edit;
$data['current']['img'] = cs_html_img('mods/gallery/image.php?usersthumb=' . $edit['usersgallery_id']);
$data['folders']['select'] = make_folders_select('folders_id', $edit['folders_id'], $account['users_id'], 'usersgallery');
$data['access']['options'] = '';
$levels = 0;
while ($levels < 6) {
$edit['usersgallery_access'] == $levels ? $sel = 1 : ($sel = 0);
示例6: cs_redirect
if ($account['access_cups'] < 4) {
echo cs_redirect($cs_lang['no_access'], 'cups', 'match', 'id=' . $cupmatches_id);
} else {
$cupmatches_id = (int) $_POST['cupmatches_id'];
if (!empty($_POST['admin_submit'])) {
$cup_match = cs_sql_select(__FILE__, 'cupmatches', '*', 'cupmatches_id = ' . $cupmatches_id);
$cs_match = array();
$cs_match['cupmatches_score1'] = (int) $_POST['cupmatches_score1'];
$cs_match['cupmatches_score2'] = (int) $_POST['cupmatches_score2'];
if ($_POST['cupmatches_score1'] > $_POST['cupmatches_score2']) {
$cs_match['cupmatches_winner'] = $cup_match['squad1_id'];
} else {
if ($_POST['cupmatches_score2'] > $_POST['cupmatches_score1']) {
$cs_match['cupmatches_winner'] = $cup_match['squad2_id'];
} else {
$error = cs_html_br(1) . $cs_lang['no_winner'];
cs_redirect($cs_lang['error_occured'] . $error, 'cups', 'match', 'id=' . $cupmatches_id);
}
}
$cs_match['cupmatches_accepted1'] = empty($_POST['cupmatches_accepted1']) ? 0 : 1;
$cs_match['cupmatches_accepted2'] = empty($_POST['cupmatches_accepted2']) ? 0 : 1;
$cells = array_keys($cs_match);
$values = array_values($cs_match);
cs_sql_update(__FILE__, 'cupmatches', $cells, $values, $cupmatches_id);
// Check for new round
if (!empty($cs_match['cupmatches_accepted1']) && !empty($cs_match['cupmatches_accepted2'])) {
$cs_match = cs_sql_select(__FILE__, 'cupmatches', '*', 'cupmatches_id = ' . $cupmatches_id, 0, 0, 1);
$loser = $cs_match['cupmatches_winner'] == $cup_match['squad1_id'] ? $cup_match['squad2_id'] : $cup_match['squad1_id'];
if ($cs_match['cupmatches_nextmatch'] != CS_CUPS_NO_NEXTMATCH) {
/* add winner team to next match */
cs_cups_addteam2match($cs_match['cups_id'], $cs_match['cupmatches_winner'], $cs_match['cupmatches_match'], $cs_match['cupmatches_round'], $cs_match['cupmatches_loserbracket'], $cs_match['cupmatches_nextmatch'], true);
示例7: empty
$wars['status']['players_id'] = $select['players_id'];
$wars['status']['wars_id'] = $wars_id;
$wars['lang']['submit'] = empty($in_list) ? $cs_lang['confirm'] : $cs_lang['edit'];
} else {
$players_id = (int) $_POST['players_id'];
$wars_id = (int) $_POST['wars_id'];
$status = $_POST['players_status'];
$time = cs_time();
if (empty($in_list)) {
$cells = array('wars_id', 'users_id', 'players_status', 'players_time');
$values = array($wars_id, $account['users_id'], $status, $time);
cs_sql_insert(__FILE__, 'players', $cells, $values);
} else {
$cells = array('players_status', 'players_time');
$values = array($status, $time);
cs_sql_update(__FILE__, 'players', $cells, $values, $players_id);
}
cs_redirect($cs_lang['success'], 'wars', 'view', 'id=' . $wars_id);
}
}
}
}
echo cs_subtemplate(__FILE__, $wars, 'wars', 'view');
$where_com = "comments_mod = 'wars' AND comments_fid = '" . $wars_id . "'";
$count_com = cs_sql_count(__FILE__, 'comments', $where_com);
include_once 'mods/comments/functions.php';
if (!empty($count_com)) {
echo cs_html_br(1);
echo cs_comments_view($wars_id, 'wars', 'view', $count_com);
}
echo cs_comments_add($wars_id, 'wars', $cs_wars['wars_close']);
示例8: elseif
} elseif (empty($_GET['delete'])) {
$data['head']['text'] = $cs_lang['body_picture'];
} else {
$data['head']['text'] = $cs_lang['remove_done'];
}
$data['head']['message'] = cs_getmsg();
$data['file']['id'] = $cs_files_id;
if (!empty($error) or empty($_POST['submit'])) {
$matches[1] = $cs_lang['pic_infos'];
$return_types = '';
foreach ($img_filetypes as $add) {
$return_types .= empty($return_types) ? $add : ', ' . $add;
}
$matches[2] = $cs_lang['max_width'] . $img_max['width'] . ' px' . cs_html_br(1);
$matches[2] .= $cs_lang['max_height'] . $img_max['height'] . ' px' . cs_html_br(1);
$matches[2] .= $cs_lang['max_size'] . cs_filesize($img_max['size']) . cs_html_br(1);
$matches[2] .= $cs_lang['filetypes'] . $return_types;
$data['upload']['clip'] = cs_abcode_clip($matches);
$data['pictures'] = array();
if (empty($file_string)) {
$data['if']['nopics'] = true;
} else {
$data['if']['nopics'] = false;
$run = 1;
$i = 0;
foreach ($file_pics as $pic) {
$data['pictures'][$i]['sad'] = $data['pictures'][$i]['thumbpath'] = 'uploads/files/thumb-' . $pic;
$data['pictures'][$i]['picpath'] = 'uploads/files/picture-' . $pic;
$data['pictures'][$i]['id'] = $run;
$run++;
$i++;
示例9: cs_mail
$title = $cs_lang['mail_titel'];
$message = $cs_lang['mail_text'] . $cs_messages[$run]['users_nick'];
$message .= $cs_lang['mail_text_2'] . $cs_main['def_title'] . $cs_lang['mail_text_3'];
$message .= $cs_contact['def_org'] . $cs_lang['mail_text_4'];
cs_mail($email, $title, $message);
if (!empty($lang_save)) {
$cs_lang = $cs_lang_save;
$account['users_lang'] = $lang_save;
}
}
}
cs_redirect($cs_lang['msg_create_done'], 'messages', 'center');
}
$data = array();
$data['if']['preview'] = false;
$data['lang']['body_create'] = empty($messages_error) ? nl2br($cs_lang['body_create']) : $cs_lang['error_occured'] . cs_html_br(1) . $errormsg;
if (isset($_POST['preview']) && empty($messages_error)) {
$data['if']['preview'] = true;
$data['var']['subject'] = cs_secure($_POST['messages_subject']);
$data['var']['date'] = cs_date('unix', $time, 1);
$data['to'] = $cs_messages;
$data['var']['text'] = cs_secure($_POST['messages_text'], 1, 1);
}
$data['msg']['to'] = cs_secure($messages_to);
$data['msg']['subject'] = cs_secure($messages_subject);
$data['msg']['smileys'] = cs_abcode_smileys('messages_text');
$data['msg']['abcode'] = cs_abcode_features('messages_text');
$data['msg']['text'] = cs_secure($messages_text);
$data['checked']['show_sender'] = empty($messages_show_sender) ? '' : ' checked="checked"';
$data['var']['reply_id'] = $reply_id;
echo cs_subtemplate(__FILE__, $data, 'messages', 'create');
示例10: getimagesize
}
if (!empty($files_gl['medals_picture']['tmp_name'])) {
$img_size = getimagesize($files_gl['medals_picture']['tmp_name']);
switch ($img_size[2]) {
case 1:
$extension = 'gif';
break;
case 2:
$extension = 'jpg';
break;
case 3:
$extension = 'png';
break;
}
if (empty($extension)) {
$error .= cs_html_br(1) . $cs_lang['wrong_ext'];
} else {
$save['medals_extension'] = $extension;
}
}
}
if (!empty($_POST['submit']) && empty($error)) {
$cells = array_keys($save);
$values = array_values($save);
cs_sql_insert(__FILE__, 'medals', $cells, $values);
if (!empty($files_gl['medals_picture']['tmp_name'])) {
$id = cs_sql_insertid(__FILE__);
$filename = 'medal-' . $id . '.' . $extension;
cs_upload('medals', $filename, $files_gl['medals_picture']['tmp_name']);
}
cs_redirect($cs_lang['create_done'], 'medals');
示例11: empty
$no_cat['lang']['no_cat'] = $cs_lang['list_no_cat'];
}
$data['tmp']['no_cat'] = empty($no_cat) ? '' : cs_subtemplate(__FILE__, $no_cat, 'usersgallery', 'users_error_1');
if (!empty($folders_loop)) {
$run = 0;
foreach ($folders as $a) {
if ($a['sub_id'] == '0') {
if (empty($a['folders_picture'])) {
$cs_lap = cs_html_img('symbols/gallery/image.gif');
} else {
$cs_lap = cs_html_img("uploads/folders/" . $a['folders_picture']);
}
$cat[$run]['img'] = cs_link($cs_lap, 'usersgallery', 'users', 'id=' . $id . '&cat_id=' . $a['folders_id']);
$more = 'id=' . $id . '&cat_id=' . $a['folders_id'];
$cat[$run]['folders_name'] = cs_link(cs_secure($a['folders_name']), 'usersgallery', 'users', $more);
$cat[$run]['folders_text'] = !empty($a['folders_text']) ? cs_secure($a['folders_text'], 1, 1) : cs_html_br(1);
$cat_id_a = $a['folders_id'];
$pic_loop = '0';
$last_update = '0';
for ($run_2 = 0; $run_2 < $gallery_loop; $run_2++) {
$gal_cat_id = $cs_gallery[$run_2]['folders_id'];
if ($cat_id_a == $gal_cat_id) {
$pic_loop++;
if ($last_update <= $cs_gallery[$run_2]['usersgallery_time']) {
$last_update = $cs_gallery[$run_2]['usersgallery_time'];
}
}
}
if ($pic_loop == 1) {
$cat[$run]['pic_count'] = sprintf($cs_lang['pic_1'], $pic_loop);
if (!empty($last_update)) {
示例12: while
$sel = 0;
while ($levels < 6) {
$cs_categories['categories_access'] == $levels ? $sel = 1 : ($sel = 0);
$data['access'][$levels]['sel'] = cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
$levels++;
}
$data['cat']['abcode_smileys'] = cs_abcode_smileys('categories_text');
$data['cat']['abcode_features'] = cs_abcode_features('categories_text');
$matches[1] = $cs_lang['pic_infos'];
$return_types = '';
foreach ($img_filetypes as $add) {
$return_types .= empty($return_types) ? $add : ', ' . $add;
}
$matches[2] = $cs_lang['max_width'] . $op_categories['max_width'] . ' px' . cs_html_br(1);
$matches[2] .= $cs_lang['max_height'] . $op_categories['max_height'] . ' px' . cs_html_br(1);
$matches[2] .= $cs_lang['max_size'] . cs_filesize($op_categories['max_size']) . cs_html_br(1);
$matches[2] .= $cs_lang['filetypes'] . $return_types;
$data['cat']['picup_clip'] = cs_abcode_clip($matches);
echo cs_subtemplate(__FILE__, $data, 'categories', 'create');
} else {
$categories_cells = array_keys($cs_categories);
$categories_save = array_values($cs_categories);
cs_sql_insert(__FILE__, 'categories', $categories_cells, $categories_save);
if (!empty($files_gl['picture']['tmp_name'])) {
$where = "categories_name = '" . cs_sql_escape($cs_categories['categories_name']) . "'";
$getid = cs_sql_select(__FILE__, 'categories', 'categories_id', $where);
$filename = 'picture-' . $getid['categories_id'] . '.' . $extension;
cs_upload('categories', $filename, $files_gl['picture']['tmp_name']);
$cs_categories2['categories_picture'] = $filename;
$categories2_cells = array_keys($cs_categories2);
$categories2_save = array_values($cs_categories2);
示例13: isset
}
}
if (isset($_POST['preview']) and empty($error)) {
$cs_static['static_title'] = $_POST['static_title'];
$cs_static['static_text'] = $_POST['static_text'];
$cs_static['static_table'] = isset($_POST['static_table']) ? 1 : 0;
$cs_static['static_comments'] = isset($_POST['static_comments']) ? 1 : 0;
$cs_static['static_access'] = $_POST['static_access'];
$cs_static['static_admins'] = isset($_POST['static_admins']) ? 1 : 0;
$cs_view_static['static']['title'] = $cs_static['static_title'];
$cs_view_static['static']['content'] = cs_secure($cs_static['static_text'], 1, 1, 1, 1, $cs_option['php_eval']);
if (empty($cs_static['static_table'])) {
echo cs_subtemplate(__FILE__, $cs_view_static, 'static', 'view');
} else {
echo cs_subtemplate(__FILE__, $cs_view_static, 'static', 'view_table');
echo cs_html_br(3);
}
}
if (!isset($_POST['submit']) or !empty($error)) {
$static_access = $cs_static['static_access'];
while ($levels < 6) {
$static_access == $levels ? $sel = 'selected="selected"' : ($sel = '');
$cs_static_tpl['access'][$levels]['level_id'] = $levels;
$cs_static_tpl['access'][$levels]['level_name'] = $cs_lang['lev_' . $levels];
$cs_static_tpl['access'][$levels]['selected'] = $sel;
$levels++;
}
if (!empty($error)) {
$cs_action_head['head']['body'] = $errormsg;
$more = 'id=' . $static_id;
} else {
示例14: cs_html_br
$print_form_height[4] = '421';
$print_form_width[4] = '298';
$print_form_height[5] = '842';
$print_form_width[5] = '595';
$print_form_height[6] = '1684';
$print_form_width[6] = '1191';
$print_form_height[7] = $print_height;
$print_form_width[7] = $print_width;
$height = $print_form_height[$print];
$width = $print_form_width[$print];
$error = '';
if (empty($print)) {
$error .= $cs_lang['error_print'] . cs_html_br(1);
}
if (empty($picture_id)) {
$error .= $cs_lang['error_pic'] . cs_html_br(1);
}
}
if (!isset($_POST['preview']) or isset($_POST['preview'])) {
$data['head']['body'] = $cs_lang['body_print'];
} elseif (!empty($error)) {
$data['head']['body'] = $error;
}
if (isset($_POST['preview']) and empty($error)) {
$data['if']['preview'] = TRUE;
if (extension_loaded('gd')) {
$data['print']['img'] = cs_html_img("mods/gallery/image.php?pic=" . $picture_id . "&size=" . $width);
$host = $cs_main['php_self']['website'] . $cs_main['php_self']['dirname'];
$data['print']['url'] = $host . "mods/gallery/print_now.php?pic=" . $picture_id . "&size=" . $width;
$data['if']['extension'] = TRUE;
} else {
示例15: cs_log_format
function cs_log_format($part, $addslashes = 0)
{
global $cs_logs, $cs_main;
$log = '';
if (is_array($cs_logs[$part])) {
foreach ($cs_logs[$part] as $file => $content) {
if (!empty($addslashes)) {
$file = str_replace('\\', '\\\\', $file);
}
$log .= cs_html_big(1) . $file . cs_html_big(0) . cs_html_br(1);
$log .= nl2br(htmlentities($content, ENT_QUOTES, $cs_main['charset']));
}
return $log;
} else {
return '';
}
}