$CPG_SESS['tell_friend'] = false; unset($CPG_SESS['tell_friend']); cpg_error(_MESSAGESENT, _Tell_a_FriendLANG, $mainindex); } } } else { $CPG_SESS['tell_friend'] = true; $sender_name = $sender_email = ''; if (is_user()) { $sender_name = !empty($userinfo['name']) ? $userinfo['name'] : $userinfo['username']; $sender_email = $userinfo['user_email']; } $message_insert = _HEY . " {recipient},\n\n" . _OURSITE . "\n\n" . _ITSCALLED . " {sitename} " . _SOMESTATS . "\n\n" . _SLOGAN . " {slogan}\n" . _FOUNDEDON . " {founded}\n" . _REGISTEREDUSERS . " {users}\n" . _TOTALSITEHITS . " {hits}\n\n" . _VISITTHEM . ($html ? ' [url={url}]{url}[/url]' : ' {url}') . "\n\n" . _KINDREGARDS . ",\n\n{sender}"; if ($html) { require_once 'includes/nbbcode.php'; $bbcode = bbcode_table('personal_message', 'tell_friend', 0); } else { $bbcode = '<div style="color: #ff0000"><strong>.: ' . _BBCODEDISABLED . ' :.</strong></div><br />'; } require_once 'header.php'; OpenTable(); echo '<form id="tell_friend" action="' . URL::index() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <div style="text-align:center;"> <span class="content"> <strong>' . _INFORMATION . '</strong> </span> <br /><br /><br /> <strong>' . _SENDERNAME . '</strong> <br /> <input type="text" name="sender_name" size="25" maxlength="255" value="' . $sender_name . '" /> <br /><br />
$act_alt = _ACTIVE; } else { $act_img = 'unchecked.gif'; $act_alt = _INACTIVE; } echo '<tr' . $bgcolor . '> <td align="center"><strong>' . $mid . '</strong></td> <td align="left" style="width:100%;">' . $title . '</td> <td align="center">' . $mlanguage . '</td> <td align="center" style="white-space:nowrap;">' . $mview . '</td> <td align="center"><a href="' . URL::admin('&status=' . $mid) . '"><img src="images/' . $act_img . '" alt="' . $act_alt . '" title="' . $act_alt . '" /></a></td> <td align="right" style="white-space:nowrap;"><a href="' . URL::admin('&edit=' . $mid) . '">' . _EDIT . '</a> / <a href="' . URL::admin('&del=' . $mid) . '">' . _DELETE . '</a> </td></tr>'; } echo '</table><br />'; CloseTable(); echo '<br />'; OpenTable(); echo '<div style="text-align:center;" class="option">' . _ADDMSG . '</div><br /> <form name="message" action="' . URL::admin('messages&save=0') . '" method="post" enctype="multipart/form-data" accept-charset="utf-8">' . '<strong>' . _MESSAGETITLE . '</strong><br />' . '<input type="text" name="title" value="" size="50" maxlength="100" /><br /><br />' . '<strong>' . _MESSAGECONTENT . '</strong><br />' . bbcode_table('content', 'message', 1) . '<div style="float:left;"> <textarea name="content" rows="15" wrap="virtual" cols="63" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);"></textarea></div> <div style="float: left; margin-left: 5px">' . smilies_table('inline', 'content', 'message') . '</div><br /><br />'; if ($MAIN_CFG['global']['multilingual']) { echo '<strong>' . _LANGUAGE . '</strong> ' . lang_selectbox($MAIN_CFG['global']['language'], 'language') . '<br /><br />'; } else { echo '<input type="hidden" name="language" value="" />'; } echo '<strong>' . _EXPIRATION . '</strong> ' . select_box('expire', 0, array(86400 => '1 ' . _DAY, 172800 => '2 ' . _DAYS, 432000 => '5 ' . _DAYS, 1296000 => '15 ' . _DAYS, 2592000 => '30 ' . _DAYS, 0 => _UNLIMITED)) . '<br /><br />' . '<strong>' . _ACTIVATE2 . '</strong> ' . yesno_option('active', 1) . '<br /><br /><strong>' . _VIEWPRIV . '</strong> ' . group_selectbox('view', 0, true) . '<br /><br /><input type="submit" value="' . _ADDMSG . '" /></form>'; } } CloseTable();
<option selected="selected" label="none" value="none">select a category</option>'; foreach ($cats as $cat) { if ($cat['level'] == 1) { if ($selects != '') { $selects .= '</optgroup>'; } $selects .= '<optgroup label="' . $cat['crumb'] . '">'; } else { $selects .= '<option value="' . $cat['cid'] . '"' . (isset($_GET['c']) && $cat['cid'] == intval($_GET['c']) || $cat['cid'] == $in['cat'] ? ' selected="selected"' : '') . '>' . $cat['crumb'] . '</option>'; } } $selects .= '</optgroup></select>'; } require_once 'header.php'; $images = DL_Image::output_list($mng_id, $in['screen']); $cpgtpl->assign_vars(array('DL_MENU' => dl_menu(), 'DL_ERRORS' => !empty($errors), 'DL_WARNINGS' => !empty($warnings), 'DL_MIRRORS' => DL_Mirror::output_list($mng_id), 'DL_IMAGES' => $images, 'IS_NEW_DL' => !can_admin($module_name), 'CAN_ADMIN' => can_admin($module_name), 'B_SCREENSHOT' => $dl_config['screen_active'] || can_admin($module_name), 'B_ADD_IMAGE' => $dl_config['screen_active'] && $images < $dl_config['screen_max'], 'B_NOTES' => false, 'B_REASON' => false, 'B_UPL_FILE' => $dl_config['upl_file'] || can_admin($module_name), 'B_UPL_IMAGE' => $dl_config['upl_image'] || can_admin($module_name), 'B_PENDING' => false, 'B_FETCH_PAD' => $fetch_pad, 'B_REM_MD5' => $dl_config['md5_remote'], 'L_YES' => _YES, 'L_NO' => _NO, 'L_DELETE' => _DELETE, 'L_UPDATE' => 'Update', 'L_CATEGORY' => _CATEGORY, 'L_SHORT_DESC' => 'Short Description', 'L_MAX_CHARS' => sprintf(_M_CHARS, 255), 'L_DESCRIPTION' => _DESCRIPTION, 'L_AUTHORNAME' => _AUTHORNAME, 'L_AUTHOREMAIL' => _AUTHOREMAIL, 'L_MD5' => 'MD5', 'S_BBCODE' => bbcode_table('in[desc_long]', 'add_download', true), 'DL_TITLE' => htmlprepare($in['title']), 'DL_ACCESS' => group_selectbox('in[access]', $in['access']), 'DL_CATSEL' => $selects, 'DL_DESC_SHORT' => htmlprepare($in['desc_short']), 'DL_DESC_LONG' => htmlprepare($in['desc_long']), 'DL_NOTES' => '', 'DL_REASON' => '', 'DL_NAME' => htmlprepare($in['name']), 'DL_EMAIL' => $in['email'], 'U_DL_FORM' => URL::index('&file=add'))); foreach ($errors as $error) { $cpgtpl->assign_block_vars('dl_errors', array('S_ENTRY' => $error)); } foreach ($warnings as $warning) { $cpgtpl->assign_block_vars('dl_warnings', array('S_ENTRY' => $warning)); } $result = $db->sql_uquery("SELECT * FROM " . $dl_prefix . "_fields \n\tWHERE visible > 0" . (!can_admin($module_name) ? ' AND visible < 3' : '') . " \n\tORDER BY title"); while ($field = $db->sql_fetchrow($result)) { $f_title = defined($field['title']) ? constant($field['title']) : $field['title']; $f_title = $field['visible'] == 2 ? '* ' . $f_title : $f_title; if ($field['type'] == 1 || $field['type'] == 3) { $f_value = isset($in[$field['field']]) ? intval($in[$field['field']]) : $field['size']; $f_value = $f_value > 0 ? array(' checked="checked"', '') : array('', ' checked="checked"'); $cpgtpl->assign_block_vars('fields', array('TITLE' => $f_title, 'TYPE' => $field['type'], 'NAME' => $field['field'], 'S_YES' => $f_value[0], 'S_NO' => $f_value[1])); } else {
function replyform($sid, $pid, $subject = '', $comment = '') { global $userinfo; if (false === stripos($subject, 'Re:')) { $subject = 'Re: ' . substr($subject, 0, 81); } if (is_user()) { $user = '******' . URL::index('Your_Account') . '">' . $userinfo['username'] . '</a>'; } else { $user = _ANONYMOUS . ' [ <a href="' . URL::index('Your_Account') . '">' . _NEWUSER . '</a> ]'; } OpenTable(); echo '<form action="' . URL::index() . '" method="post" name="postcomment" enctype="multipart/form-data" accept-charset="utf-8"> <span class="option"><b>' . _YOURNAME . ':</b></span> ' . $user . ' <br /><br /><span class="option"><b>' . _SUBJECT . ':</b></span><br /> <input type="text" name="subject" size="50" maxlength="85" value="' . htmlprepare($subject) . '" /><br /> <table border="0"><tr><td> <span class="option"><b>' . _UCOMMENT . ':</b></span><br /> ' . bbcode_table('comment', 'postcomment') . ' <textarea wrap="virtual" cols="65" rows="10" name="comment">' . $comment . '</textarea></td><td valign="bottom"> ' . smilies_table('inline', 'comment', 'postcomment') . ' </td></tr></table><br /> <input type="hidden" name="pid" value="' . $pid . '" /> <input type="hidden" name="sid" value="' . $sid . '" /> <input type="submit" name="preview" value="' . _PREVIEW . '" /> <input type="submit" name="postreply" value="' . _OK . '" /> </form>'; CloseTable(); }
$Revision: 9.14 $ $Author: nanocaiordo $ $Date: 2008/07/31 14:11:19 $ **********************************************/ if (!defined('CPG_NUKE')) { exit; } $pagetitle .= _ContactLANG; require_once 'includes/nbbcode.php'; $subject = $MAIN_CFG['global']['sitename'] . ' ' . _FEEDBACK; $recip = ''; $sender_name = isset($_POST['sender_name']) ? $_POST['sender_name'] : ''; $sender_email = isset($_POST['sender_email']) ? $_POST['sender_email'] : ''; $send_to = is_admin() && isset($_POST['send_to']) ? $_POST['send_to'] : ''; $message = isset($_POST['message']) ? $_POST['message'] : ''; $bb = $MAIN_CFG['email']['allow_html_email'] || is_admin() ? bbcode_table('message', 'email_mod', 0) : ''; $html = $MAIN_CFG['email']['allow_html_email'] || is_admin() ? 1 : 0; if (is_admin()) { $sender_email = $MAIN_CFG['global']['adminmail']; $sender_name = $MAIN_CFG['global']['sitename']; $recip = '<label for="send_to"><strong>' . _SEND_TO . '</strong></label><br /><input type="text" name="send_to" id="send_to" size="30" maxlength="255" /><br />'; } if (!isset($_POST['opi'])) { if (is_user()) { $sender_name = !empty($userinfo['name']) ? $userinfo['name'] : $userinfo['username']; $sender_email = $userinfo['user_email']; } require_once 'header.php'; generate_secimg(); $cpgtpl->set_handle('body', 'contact/index.html'); $cpgtpl->assign_vars(array('S_SITENAME' => $MAIN_CFG['global']['sitename'], 'S_SENDER' => $sender_name, 'S_SENDER_MAIL' => $sender_email, 'S_MESSAGE' => $message, 'S_BB' => $bb, 'S_RECIP' => $recip, 'S_GFX_IMG' => generate_secimg(), 'U_ACTION' => URL::index($module_name)));
$template->assign_block_vars('switch_bbcode_checkbox', array()); } else { $bbcode_status = $lang['BBCode_is_OFF']; } if ($mode == 'reply') { $mode = 'post'; } $s_hidden_fields = '<input type="hidden" name="folder" value="' . $folder . '" />'; $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />'; if ($mode == 'edit') { $s_hidden_fields .= '<input type="hidden" name="p" value="' . $privmsg_id . '" />'; } if (!empty($privmsg_subject)) { $privmsg_subject = htmlprepare($privmsg_subject); } $template->assign_vars(array('S_FOLDER' => $folder, 'S_PREVIEW_BOX' => $preview && !$error, 'SUBJECT' => $privmsg_subject, 'USERNAME' => !empty($to_username) ? htmlprepare($to_username) : '', 'MESSAGE' => isset($privmsg_message) ? $privmsg_message : '', 'HTML_ON' => false, 'BBCODE_ON' => $MAIN_CFG['private_messages']['allow_bbcode'] ? bbcode_table('message', 'post', 1) : '', 'SMILIES_ON' => $MAIN_CFG['private_messages']['allow_smilies'] ? smilies_table('inline', 'message', 'post') : '', 'SIG_ON' => $MAIN_CFG['private_messages']['allow_sig'] && $user_sig != '', 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . URL::index('Forums&file=faq&mode=bbcode') . '" target="_phpbbcode">', '</a>'), 'L_SPELLCHECK' => $lang['Spellcheck'], 'L_CANCEL' => $lang['Cancel'], 'L_POST_A' => $pagetitle, 'L_FIND' => $lang['Find'], 'L_EMPTY_MESSAGE' => $lang['Empty_message'], 'S_HTML_CHECKED' => !$html_on ? ' checked="checked"' : '', 'S_BBCODE_CHECKED' => !$bbcode_on ? ' checked="checked"' : '', 'S_SMILIES_CHECKED' => !$smilies_on ? ' checked="checked"' : '', 'S_SIGNATURE_CHECKED' => $attach_sig ? ' checked="checked"' : '', 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, 'U_SEARCH_USER' => URL::index('Forums&file=search&mode=searchuser&popup=1', true, true), 'U_VIEW_FORUM' => URL::index())); $template->set_handle('body', 'private_msgs/posting_body.html'); $template->display('body'); return; } } } } } // // Update unread status // $db->sql_query("UPDATE " . $user_prefix . "_users\n\tSET user_unread_privmsg = user_unread_privmsg + user_new_privmsg, user_new_privmsg = 0, user_last_privmsg = " . $CPG_SESS['session_start'] . "\n\tWHERE user_id = " . $userinfo['user_id']); $db->sql_query("UPDATE " . $prefix . "_bbprivmsgs\n\tSET privmsgs_type = " . PM_UNREAD_MAIL . "\n\tWHERE privmsgs_type = " . PM_NEW_MAIL . "\n\t\tAND privmsgs_to_userid = " . $userinfo['user_id']); // // Reset PM counters
} else { if (isset($post_data['icon_id']) && $val['icon_id'] == $post_data['icon_id']) { //this is the current icon for this thread (stored) $selected = 'selected'; } } $template->assign_block_vars('topic_icon_option', array('S_ICON_ID' => $val['icon_id'], 'S_ICON_NAME' => $val['icon_name'], 'S_SELECTED' => $selected)); //add this icons url to the javascript array $icons_array .= "icons_array[" . $val['icon_id'] . "] = '" . $val['icon_url'] . "';"; } $template->assign_vars(array('ICONS_ARRAY' => $icons_array)); } // // Output the data to the template // $template->assign_vars(array('USERNAME' => $username, 'SUBJECT' => $subject, 'MESSAGE' => $message, 'HTML_STATUS' => $html_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . URL::index("&file=faq&mode=bbcode") . '" target="_phpbbcode">', '</a>'), 'SMILIES_STATUS' => $smilies_status, 'BBCODE_TABLE' => bbcode_table('message', 'post', 1), 'SMILES_TABLE' => smilies_table('inline', 'message', 'post'), 'L_EMOTICONS' => $lang['Emoticons'], 'L_SUBJECT' => $lang['Subject'], 'L_MESSAGE_BODY' => $lang['Message_body'], 'L_OPTIONS' => $lang['Options'], 'L_PREVIEW' => $lang['Preview'], 'L_SPELLCHECK' => $lang['Spellcheck'], 'L_SUBMIT' => $lang['Submit'], 'L_CANCEL' => $lang['Cancel'], 'L_CONFIRM_DELETE' => $lang['Confirm_delete'], 'L_DISABLE_HTML' => $lang['Disable_HTML_post'], 'L_DISABLE_BBCODE' => $lang['Disable_BBCode_post'], 'L_DISABLE_SMILIES' => $lang['Disable_Smilies_post'], 'L_ATTACH_SIGNATURE' => $lang['Attach_signature'], 'L_NOTIFY_ON_REPLY' => $lang['Notify'], 'L_DELETE_POST' => $lang['Delete_post'], 'L_EMPTY_MESSAGE' => $lang['Empty_message'], 'L_GO' => $lang['Go'], 'U_VIEWTOPIC' => $mode == 'reply' ? URL::index("&file=viewtopic&" . POST_TOPIC_URL . "={$topic_id}&postorder=desc") : '', 'U_REVIEW_TOPIC' => $mode == 'reply' ? URL::index("&file=posting&mode=topicreview&" . POST_TOPIC_URL . "={$topic_id}&popup=1") : '', 'S_HTML_CHECKED' => !$html_on ? 'checked="checked"' : '', 'S_BBCODE_CHECKED' => !$bbcode_on ? 'checked="checked"' : '', 'S_SMILIES_CHECKED' => !$smilies_on ? 'checked="checked"' : '', 'S_SIGNATURE_CHECKED' => $attach_sig ? 'checked="checked"' : '', 'S_NOTIFY_CHECKED' => $notify_user ? 'checked="checked"' : '', 'S_TYPE_TOGGLE' => $topic_type_toggle, 'S_TOPIC_ID' => $topic_id, 'S_POST_ACTION' => URL::index('&file=posting'), 'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields, 'S_TOPIC_ICON_SELECT' => $set_topic_icon)); // // Poll entry switch/output // if (($mode == 'newtopic' || $mode == 'editpost' && $post_data['edit_poll']) && $is_auth['auth_pollcreate']) { $template->assign_vars(array('L_ADD_A_POLL' => $lang['Add_poll'], 'L_ADD_POLL_EXPLAIN' => $lang['Add_poll_explain'], 'L_POLL_QUESTION' => $lang['Poll_question'], 'L_POLL_OPTION' => $lang['Poll_option'], 'L_ADD_OPTION' => $lang['Add_option'], 'L_UPDATE_OPTION' => $lang['Update'], 'L_DELETE_OPTION' => $lang['Delete'], 'L_POLL_LENGTH' => $lang['Poll_for'], 'L_DAYS' => $lang['Days'], 'L_POLL_LENGTH_EXPLAIN' => $lang['Poll_for_explain'], 'L_POLL_DELETE' => $lang['Delete_poll'], 'POLL_TITLE' => $poll_title, 'POLL_LENGTH' => $poll_length)); if ($mode == 'editpost' && $post_data['edit_poll'] && $post_data['has_poll']) { $template->assign_block_vars('switch_poll_delete_toggle', array()); } if (!empty($poll_options)) { while (list($option_id, $option_text) = each($poll_options)) { $template->assign_block_vars('poll_option_rows', array('POLL_OPTION' => str_replace('"', '"', $option_text), 'S_POLL_OPTION_NUM' => $option_id)); } } $template->assign_var_from_handle('POLLBOX', 'pollbody'); }
if ($mode == 'avatar') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'avatar', 'S_AV_ALLOW_LOCAL' => yesno_option('allow_local', $MAIN_CFG['avatar']['allow_local']), 'S_AV_ALLOW_REMOTE' => yesno_option('allow_remote', $MAIN_CFG['avatar']['allow_remote']), 'S_AV_ALLOW_UPLOAD' => yesno_option('allow_upload', $MAIN_CFG['avatar']['allow_upload']), 'S_AV_ALLOW_ANIMATED' => yesno_option('animated', $MAIN_CFG['avatar']['animated']), 'S_AV_MAX_FILESIZE' => $MAIN_CFG['avatar']['filesize'], 'S_AV_MAX_HEIGHT' => $MAIN_CFG['avatar']['max_height'], 'S_AV_MAX_WIDTH' => $MAIN_CFG['avatar']['max_width'], 'S_AV_STORAGE_PATH' => $MAIN_CFG['avatar']['path'], 'S_AV_GALLERY_PATH' => $MAIN_CFG['avatar']['gallery_path'], 'S_AV_DEFAULT' => $MAIN_CFG['avatar']['default'])); } else { if ($mode == 'fields') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'fields')); $section = 0; $result = $db->sql_query("SELECT * FROM " . $user_prefix . "_users_fields ORDER BY section"); while ($row = $db->sql_fetchrow($result)) { $options = array(0 => _MA_HIDDEN, 1 => _MA_VISIBLE); if ($row['type'] != 1 && $row['type'] != 3) { $options[2] = _MA_REQUIRED; } $cpgtpl->assign_block_vars('section', array('S_SECTION' => $row['section'], 'S_PROFILE' => $row['section'] == 1 && !$section, 'S_ADDITIONAL' => $row['section'] == 2 && $section !== 2, 'S_PRIVATE' => $row['section'] == 3 && $section !== 3, 'S_PREFERENCES' => $row['section'] == 5 && $section !== 5, 'S_INFO' => defined($row['langdef']) ? constant($row['langdef']) : $row['langdef'], 'S_SELECT' => select_box($row['field'], $row['visible'], $options), 'U_DELFIELD' => URL::admin('users_cfg&delfield=' . $row['field']))); $section = (int) $row['section']; } $db->sql_freeresult($result); } else { if ($mode == 'addfield') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'add_field')); } else { if ($mode == 'mlist') { //$db->sql_ufetchrow('SELECT * FROM '); } else { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'member', 'S_ADMIN_HELP' => 1 == $MAIN_CFG['global']['admin_help'], 'S_HEADLINES_TIP' => show_tooltip('my_headlines'), 'S_HEADLINES_CFG' => yesno_option('my_headlines', $MAIN_CFG['member']['my_headlines'], 3), 'S_USER_NEWS_TIP' => show_tooltip('user_news'), 'S_USER_NEWS_CFG' => yesno_option('user_news', $MAIN_CFG['member']['user_news']), 'S_THEME_TIP' => show_tooltip('allowusertheme'), 'S_THEME_CFG' => yesno_option('allowusertheme', $MAIN_CFG['member']['allowusertheme']), 'S_MAILCHANGE_TIP' => show_tooltip('allowmailchange'), 'S_MAILCHANGE_CFG' => yesno_option('allowmailchange', $MAIN_CFG['member']['allowmailchange']), 'S_MINPASS_TIP' => show_tooltip('minpass'), 'S_MINPASS_CFG' => select_option('minpass', $MAIN_CFG['member']['minpass'], array('3', '5', '8', '10')), 'S_USERREG_TIP' => show_tooltip('allowuserreg'), 'S_USERREG_CFG' => yesno_option('allowuserreg', $MAIN_CFG['member']['allowuserreg']), 'S_USER_ACTIVATE_TIP' => show_tooltip('useactivate'), 'S_USER_ACTIVATE_CFG' => yesno_option('useactivate', $MAIN_CFG['member']['useactivate']), 'S_REQUIRE_ADMIN_TIP' => show_tooltip('requireadmin'), 'S_REQUIRE_ADMIN_CFG' => yesno_option('requireadmin', $MAIN_CFG['member']['requireadmin']), 'S_SENDMAIL_TIP' => show_tooltip('sendaddmail'), 'S_SENDMAIL_CFG' => yesno_option('sendaddmail', $MAIN_CFG['member']['sendaddmail']), 'S_SHOW_REGMSG_TIP' => show_tooltip('show_registermsg'), 'S_SHOW_REGMSG_CFG' => yesno_option('show_registermsg', $MAIN_CFG['member']['show_registermsg']), 'S_REGMSG_CFG' => $MAIN_CFG['member']['registermsg'], 'S_WELCOME_PM_TIP' => show_tooltip('send_welcomepm'), 'S_WELCOME_PM_CFG' => yesno_option('send_welcomepm', $MAIN_CFG['member']['send_welcomepm']), 'S_WELCOME_MSG_BB' => bbcode_table('welcomepm_msg', 'config', 1), 'S_WELCOME_MSG_CFG' => $MAIN_CFG['member']['welcomepm_msg'])); } } } } $cpgtpl->set_handle('body', 'admin/users/index.html'); $cpgtpl->display('body'); CloseTable();
<option selected="selected" label="none" value="none">select a category</option>'; foreach ($cats as $cat) { if ($cat['level'] == 1) { if ($selects != '') { $selects .= '</optgroup>'; } $selects .= '<optgroup label="' . $cat['crumb'] . '">'; } else { $selects .= '<option value="' . $cat['cid'] . '"' . ($cat['cid'] == $in['cat'] ? ' selected="selected"' : '') . '>' . $cat['crumb'] . '</option>'; } } $selects .= '</optgroup></select>'; } require_once 'header.php'; $images = DL_Image::output_list($mng_id, $in['screen']); $cpgtpl->assign_vars(array('DL_MENU' => '<span class="gen"><strong>My Downloads</strong></span><br /><a href="' . URL::index() . '">Main Page</a> | <a href="' . URL::index('&file=manage') . '">Current Downloads</a> | <a href="' . URL::index('&file=manage&s=1') . '">Pending Downloads</a> | <a href="' . URL::index('&file=manage&s=2') . '">Broken D/L Reports</a>', 'DL_ERRORS' => !empty($errors), 'DL_WARNINGS' => !empty($warnings), 'DL_MIRRORS' => DL_Mirror::output_list($mng_id), 'DL_IMAGES' => $images, 'IS_NEW_DL' => false, 'CAN_ADMIN' => can_admin($module_name), 'B_SCREENSHOT' => $dl_config['screen_active'] || can_admin($module_name), 'B_ADD_IMAGE' => $dl_config['screen_active'] && $images < $dl_config['screen_max'], 'B_NOTES' => can_admin($module_name), 'B_REASON' => true, 'B_UPL_FILE' => $dl_config['upl_file'] || can_admin($module_name), 'B_UPL_IMAGE' => $dl_config['upl_image'] || can_admin($module_name), 'B_PENDING' => $row['active'] == 2 && can_admin($module_name), 'B_FETCH_PAD' => false, 'B_REM_MD5' => $dl_config['md5_remote'], 'L_YES' => _YES, 'L_NO' => _NO, 'L_DELETE' => _DELETE, 'L_UPDATE' => 'Update', 'L_CATEGORY' => _CATEGORY, 'L_SHORT_DESC' => 'Short Description', 'L_MAX_CHARS' => sprintf(_M_CHARS, 255), 'L_DESCRIPTION' => _DESCRIPTION, 'L_AUTHORNAME' => _AUTHORNAME, 'L_AUTHOREMAIL' => _AUTHOREMAIL, 'L_MD5' => 'MD5', 'L_PENDING' => 'Pending', 'S_BBCODE' => bbcode_table('in[desc_long]', 'add_download', true), 'DL_TITLE' => htmlprepare($in['title']), 'DL_ACCESS' => group_selectbox('in[access]', $in['access']), 'DL_CATSEL' => $selects, 'DL_DESC_SHORT' => htmlprepare($in['desc_short']), 'DL_DESC_LONG' => htmlprepare($in['desc_long']), 'DL_NOTES' => isset($in['notes']) ? htmlprepare($in['notes']) : '', 'DL_REASON' => htmlprepare($in['reason']), 'DL_NAME' => htmlprepare($in['name']), 'DL_EMAIL' => $in['email'], 'U_DL_FORM' => URL::index('&file=manage&edit=' . $mng_id))); foreach ($errors as $error) { $cpgtpl->assign_block_vars('dl_errors', array('S_ENTRY' => $error)); } foreach ($warnings as $warning) { $cpgtpl->assign_block_vars('dl_warnings', array('S_ENTRY' => $warning)); } $result = $db->sql_uquery("SELECT * FROM " . $dl_prefix . "_fields \n\t\tWHERE visible > 0" . (!can_admin($module_name) ? ' AND visible < 3' : '') . " \n\t\tORDER BY title"); while ($field = $db->sql_fetchrow($result)) { $f_title = defined($field['title']) ? constant($field['title']) : $field['title']; $f_title = $field['visible'] == 2 ? '* ' . $f_title : $f_title; if ($field['type'] == 1 || $field['type'] == 3) { $f_value = isset($in[$field['field']]) ? intval($in[$field['field']]) : $field['size']; $f_value = $f_value > 0 ? array(' checked="checked"', '') : array('', ' checked="checked"'); $cpgtpl->assign_block_vars('fields', array('TITLE' => $f_title, 'TYPE' => $field['type'], 'NAME' => $field['field'], 'S_YES' => $f_value[0], 'S_NO' => $f_value[1])); } else {
function mod_review() { global $prefix, $db, $MAIN_CFG, $module_name; $id = intval($_GET['id']); if ($id == 0 || !can_admin(strtolower($module_name))) { cpg_error('This function must be passed argument id, or you are not admin.'); } if (!($myrow = $db->sql_ufetchrow("SELECT * FROM " . $prefix . "_reviews WHERE id = {$id}"))) { cpg_error('Review with id "' . $id . '" doesn\'t exist'); } $bb = $MAIN_CFG['Reviews']['allow_bbcode'] || can_admin(strtolower($module_name)) ? bbcode_table('text', 'reviewmod', 1) : ''; require_once 'header.php'; OpenTable(); echo '<div style="text-align:center;"><b>' . _REVIEWMOD . '</b></div><br /><br /> <form method="post" name="reviewmod" action="' . URL::index('&rop=preview_review') . '"> <table border="0" width="100%"> <tr> <td style="width:12%;"><b>' . _RDATE . '</b><input type="hidden" name="id" value="' . $myrow['id'] . '" /></td> <td><input type="text" name="date" size="15" value="' . $myrow['date'] . '" maxlength="10" /></td> </tr><tr> <td><b>' . _RTITLE . '</b></td> <td><input type="text" name="title" size="50" maxlength="150" value="' . htmlprepare($myrow['title']) . '" /></td> </tr><tr> <td><b>' . _LANGUAGE . '</b></td><td>' . lang_selectbox($myrow['language'], 'language') . '</td> </tr><tr> <td><b>' . _RTEXT . '</b></td> <td>' . $bb . '<br /><textarea class="textbox" name="text" rows="20" wrap="virtual" cols="60">' . $myrow['text'] . '</textarea></td> </tr><tr> <td><b>' . _REVIEWER . '</b></td> <td><input type="text" name="reviewer" size="41" maxlength="40" value="' . $myrow['reviewer'] . '" /></td> </tr><tr> <td><b>' . _REVEMAIL . '</b></td> <td><input type="text" name="email" value="' . $myrow['email'] . '" size="30" maxlength="80" /></td> </tr><tr> <td><b>' . _SCORE . '</b></td> <td><input type="text" name="score" value="' . $myrow['score'] . '" size="3" maxlength="2" /></td> </tr><tr> <td><b>' . _RLINK . '</b></td> <td><input type="text" name="url" value="' . $myrow['url'] . '" size="30" maxlength="100" /></td> </tr><tr> <td><b>' . _RLINKTITLE . '</b></td> <td><input type="text" name="url_title" value="' . htmlprepare($myrow['url_title']) . '" size="30" maxlength="50" /></td> </tr><tr> <td><b>' . _COVERIMAGE . '</b></td> <td><input type="text" name="cover" value="' . $myrow['cover'] . '" size="30" maxlength="100" /></td> </tr><tr> <td><b>' . _HITS . ':</b></td> <td><input type="text" name="hits" value="' . $myrow['hits'] . '" size="5" maxlength="5" /></td> </tr><tr> <td colspan="2"><input type="submit" value="' . _PREMODS . '" /> <input type="button" onclick="history.go(-1)" value="' . _CANCEL . '" /></td> </tr> </table> </form>'; CloseTable(); }
cpg_error('<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2" align="center" height="30">' . _B_AUTHREQUIRED . '</td></tr> </table>'); } if ($blog_private && $blog_author != $userinfo['username']) { cpg_error('<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2" align="center" height="30">' . _B_PRIVATE . '</td></tr> </table>'); } echo '<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2"><a href="' . getlink() . '">' . _MAIN . '</a> | <a href="' . getlink('&mode=user&nick=' . $userinfo['username']) . '">' . _B_MYBLOG . '</a> | <a href="' . getlink('&mode=add') . '">' . _B_CREATE_TITLE . '</a></td></tr> <form name="edit_entry" action="' . getlink() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <tr><td class="row1"><span class="gen">' . _TITLE . '</span></td> <td class="row2"><input type="text" value="' . $blog_title . '" size="50" maxlength="80" name="title" /></td></tr> <tr><td class="row1"><span class="gen">' . _B_CREATE_TEXT . '</span></td> <td class="row2">' . bbcode_table('bodytext', 'edit_entry', 1) . '<textarea name="bodytext" wrap="virtual" cols="70" rows="15">' . $blog_text . '</textarea>' . smilies_table('onerow', 'bodytext', 'edit_entry') . '</td></tr> <tr><td class="row1"><span class="gen">' . _B_CREATE_PRIVATE . '</span></td> <td class="row1"><span class="gen">' . yesno_option('private', $blog_private) . '</td></tr> <tr><td class="catbottom" colspan="2" align="center" height="28"> <input type="hidden" name="blog_id" value="' . $blog_id . '" /> <input type="submit" name="revise_entry" class="mainoption" value="' . _SAVECHANGES . '" /> <input type="reset" value="' . _RESET . '" name="reset" class="liteoption" /> </td></tr></table></form>'; } elseif ($mode == 'display') { $disp_id = intval($_GET['id']); require_once 'header.php'; $result = $db->sql_query("SELECT * FROM " . $prefix . "_blogs WHERE id='{$disp_id}'"); if ($db->sql_numrows($result) < 1) { cpg_error('<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2" align="center" height="30">' . sprintf(_ERROR_NONE_TO_DISPLAY, strtolower(_B_TITLE)) . '</td></tr> </table>'); }
function BlocksEdit($bid) { global $prefix, $db, $MAIN_CFG, $pagetitle, $cpgtpl; $pagetitle .= ' ' . _BC_DELIM . ' ' . _EDITBLOCK; require 'header.php'; GraphicAdmin('_AMENU1'); list($title, $bkey, $content, $url, $bposition, $weight, $active, $refresh, $blanguage, $blockfile, $view) = $db->sql_ufetchrow("SELECT title, bkey, content, url, bposition, weight, active, refresh, blanguage, blockfile, view FROM " . $prefix . "_blocks WHERE bid='" . $bid . "'", SQL_NUM); $typebb = $typerss = $typefile = false; $blocks_edit_vars = array('S_NAME' => $title, 'S_BID' => $bid, 'S_WEIGHT' => $weight, 'S_NAME_DEF' => (defined($title) ? constant($title) : str_replace('_', ' ', $title)) . ":", 'U_BLOCKS' => URL::admin('blocks'), 'MULTILANG' => $MAIN_CFG['global']['multilingual'], 'BPOSITION' => $bposition, 'SEL_POSITION' => select_box('bposition', $bposition, array('l' => _LEFT, 'c' => _CENTERUP, 'd' => _CENTERDOWN, 'r' => _RIGHT)), 'SEL_ACTIVATE' => yesno_option('active', $active), 'SEL_GROUP' => group_selectbox('view', $view, true), 'S_VIEW_COMMENT' => 'Default ' . _ACTIVE); if ($MAIN_CFG['global']['multilingual']) { $blocks_edit_vars += array('SEL_LANG' => lang_selectbox($blanguage, 'blanguage')); } switch ($bkey) { case 'file': $typefile = true; $blocksdir = dir('blocks'); while ($func = $blocksdir->read()) { if (substr($func, 0, 6) == 'block-') { $bl = str_replace('_', ' ', substr($func, 6, -4)); $blockslist[$func] = $bl; } } closedir($blocksdir->handle); ksort($blockslist); $blocks_edit_vars += array('S_BLOCK_OP' => select_box('blockfile', $blockfile, $blockslist), 'S_BLOCK_INFO' => _FILEINCLUDE); break; case 'rss': $typerss = true; $blocks_edit_vars += array('S_BLOCK_OP' => $url, 'SEL_REFRESH' => select_box('refresh', $refresh, array('1800' => '1/2 ' . _HOUR, '3600' => '1 ' . _HOUR, '18000' => '5 ' . _HOURS, '36000' => '10 ' . _HOURS, '86400' => '24 ' . _HOURS))); break; case 'admin': case 'custom': $typebb = true; $blocks_edit_vars += array('S_BLOCK_OP' => bbcode_table('content', 'blocksedit', 1), 'S_BLOCK_INFO' => $content); break; default: break; } $blocks_list = blocks_list(); foreach ($blocks_list as $module => $data) { $cpgtpl->assign_block_vars($data['mid'] == -1 ? 'admin' : (is_active($module) ? 'active' : 'inactive'), array('S_MOD_VALUE' => $data['mid'], 'S_MOD_TITLE' => defined($data['title']) ? constant($data['title']) : $data['title'], 'S_MOD_SELECTED' => isset($data[$bid]) ? ' selected="selected"' : '')); } $blocks_edit_vars += array('TYPEFILE' => $typefile, 'TYPERSS' => $typerss, 'TYPEBB' => $typebb); $cpgtpl->assign_vars($blocks_edit_vars); $cpgtpl->set_handle('body', 'admin/blocks_edit.html'); $cpgtpl->display('body'); }
$user_sig = $MAIN_CFG['private_messages']['allow_bbcode'] ? decode_bbcode($user_sig, 1, false) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $user_sig); } $private_message = $MAIN_CFG['private_messages']['allow_bbcode'] ? decode_bbcode($private_message, 1, false) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $private_message); $private_message = make_clickable($private_message); if ($privmsg['privmsgs_attach_sig'] && $user_sig != '') { $private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig); } if ($MAIN_CFG['private_messages']['allow_smilies'] && $privmsg['privmsgs_enable_smilies']) { $private_message = set_smilies($private_message); } // $private_message = str_replace("\n", '<br />', $private_message); $template->assign_vars(array('MESSAGE_FROM' => $privmsg['username_1'], 'MESSAGE_TO' => $privmsg['username_2'], 'POST_SUBJECT' => $post_subject, 'POST_DATE' => L10NTime::date($MAIN_CFG['global']['dateformat'], $privmsg['privmsgs_date'], $userinfo['user_dst'], $userinfo['user_timezone']), 'MESSAGE' => $private_message, 'U_MESSAGE_FROM' => URL::index('Your_Account&profile=' . $privmsg['username_1']), 'U_MESSAGE_TO' => URL::index('Your_Account&profile=' . $privmsg['username_2']))); // PM QUICK REPLY //if ( $MAIN_CFG['private_messages']['ropm_quick_reply'] && $privmsg['privmsgs_from_userid'] != $userinfo['user_id'] ) if ($folder == 'inbox' && $MAIN_CFG['private_messages']['quick_reply']) { require_once 'includes/nbbcode.php'; $last_msg = $privmsg['privmsgs_text']; $last_msg = '[quote="' . $privmsg['username_1'] . '"]' . $last_msg . '[/quote]'; $last_msg = str_replace('\\', '\\\\', $last_msg); //' $last_msg = str_replace('"', '"', $last_msg); $last_msg = str_replace(chr(13), '', $last_msg); $s_hidden_fields = ' <input type="hidden" name="folder" value="' . $folder . '" /> <input type="hidden" name="mode" value="post" /> <input type="hidden" name="username" value="' . $privmsg['username_1'] . '" />'; $template->assign_block_vars('quickreply', array('POST_ACTION' => URL::index(), 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'SUBJECT' => (!preg_match('/^Re:/', $privmsg['privmsgs_subject']) ? 'Re: ' : '') . $privmsg['privmsgs_subject'], 'HTML_ON' => $MAIN_CFG['private_messages']['allow_html'], 'SMILIES_ON' => $MAIN_CFG['private_messages']['allow_smilies'] ? smilies_table('onerow', 'message', 'qreply') : '', 'BBCODE_ON' => $MAIN_CFG['private_messages']['allow_bbcode'] ? bbcode_table('message', 'qreply', 1) : '', 'SIG_ON' => $MAIN_CFG['private_messages']['allow_sig'] && $user_sig != '', 'S_HTML_CHECKED' => !$userinfo['user_allowhtml'] ? ' checked="checked"' : '', 'S_BBCODE_CHECKED' => !$userinfo['user_allowbbcode'] ? ' checked="checked"' : '', 'S_SMILIES_CHECKED' => !$userinfo['user_allowsmile'] ? ' checked="checked"' : '', 'S_QREPLY_MSG' => $last_msg, 'S_SIG_CHECKED' => $userinfo['user_sig'] != '' && $MAIN_CFG['private_messages']['allow_sig'] ? $userinfo['user_sig'] : '')); $template->assign_vars(array('L_MESSAGE' => $lang['Message'], 'L_OPTIONS' => $lang['Options'], 'L_QUOTE_SELECTED' => $lang['PMQR_QuoteSelelected'], 'L_NO_TEXT_SELECTED' => $lang['PMQR_QuoteSelelectedEmpty'], 'L_ERROR' => $lang['Error'], 'L_QUOTE_LAST_MESSAGE' => $lang['PMQR_Quick_quote'], 'L_QUICK_REPLY' => $lang['PMQR_Quick_Reply'])); } $template->set_filenames(array('body' => 'private_msgs/read_body.html')); $template->display('body');
function edithome() { global $userinfo, $pagetitle, $MAIN_CFG, $Blocks; $block = array('bid' => 10000, 'view' => 1, 'side' => 'l', 'title' => _TB_BLOCK, 'content' => member_block()); $Blocks->custom($block); $block = NULL; $pagetitle .= ' ' . _BC_DELIM . ' ' . _MA_HOMECONFIG; require_once 'header.php'; require_once CORE_PATH . 'nbbcode.php'; $cpgtpl->assign_vars(array('U_SAVEHOME' => URL::index('&op=savehome'), 'S_USER_NEWS' => $MAIN_CFG['member']['user_news'] ? select_option('storynum', $userinfo['storynum'], array('4', '6', '8', '10', '12', '14', '16', '18', '20')) : false, 'S_STORY_NUM' => $MAIN_CFG['global']['storyhome'], 'S_UBLOCKON' => yesno_option('ublockon', $userinfo['ublockon']), 'S_CONT_SIZE' => sprintf(_M_CHARS, 255), 'S_BBCODETBL' => bbcode_table('ublock', 'edit_home', 1), 'S_UBLOCK' => $userinfo['ublock'])); $cpgtpl->set_filenames(array('body' => 'your_account/edit_home.html')); $cpgtpl->display('body'); }