if (!defined("USER_WIDTH")) { define("USER_WIDTH", "width:95%"); } // the user box and subject box are not always displayed, therefore we need to define them /in case/ they are, if not they'll be ignored. if (!$userbox) { $userbox = "<tr>\n<td class='forumheader2' style='width:20%'>" . LAN_61 . "</td>\n<td class='forumheader2' style='width:80%'>\n<input class='tbox' type='text' name='anonname' size='71' value='" . $anonname . "' maxlength='20' style='width:95%' />\n</td>\n</tr>"; } if (!$subjectbox) { $subjectbox = "<tr>\n<td class='forumheader2' style='width:20%'>" . LAN_62 . "</td>\n<td class='forumheader2' style='width:80%'>\n<input class='tbox' type='text' name='subject' size='71' value='" . $subject . "' maxlength='100' style='width:95%' />\n</td>\n</tr>"; } // the poll is optional, be careful when changing the values here, only change if you know what you're doing ... if (!$poll_form) { if (is_readable(e_PLUGIN . 'poll/poll_class.php')) { require_once e_PLUGIN . 'poll/poll_class.php'; $pollo = new poll(); $poll_form = $pollo->renderPollForm('forum'); } } // finally, file attach is optional, again only change this if you know what you're doing ... if (!$fileattach) { $fileattach = "\n<tr>\n\t<td colspan='2' class='nforumcaption2'>" . ($pref['image_post'] ? LAN_390 : LAN_416) . "</td>\n</tr>\n<tr>\n\t<td style='width:20%' class='forumheader3'>" . LAN_392 . "</td>\n\t<td style='width:80%' class='forumheader3'>" . LAN_393 . " | " . $allowed_filetypes . " |<br />" . LAN_394 . "<br />" . LAN_395 . ": " . ($max_upload_size ? $max_upload_size . LAN_396 : ini_get('upload_max_filesize')) . "\n\t\t<br />\n\t\t<div id='fiupsection'>\n\t\t<span id='fiupopt'>\n\t\t\t<input class='tbox' name='file_userfile[]' type='file' size='47' />\n\t\t</span>\n\t\t</div>\n\t\t<input class='button' type='button' name='addoption' value='" . LAN_417 . "' onclick=\"duplicateHTML('fiupopt','fiupsection')\" />\n\t</td>\n</tr>\n"; //</td> //</tr> } // If the upload directory is not writable, we need to alert the user about this. if (!$fileattach_alert) { $fileattach_alert = "\n\t<tr>\n\t\t<td colspan='2' class='nforumcaption2'>" . ($pref['image_post'] ? LAN_390 : LAN_416) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan='2' class='forumheader3'>" . LAN_FORUM_1 . "</td>\n\t</tr>\n"; } // ------------ if (!$FORUMPOST) { $FORUMPOST = "\n<div style='text-align:center'>\n<div class='spacer'>\n{FORMSTART}\n<table style='" . USER_WIDTH . "' class='fborder'>\n<tr>\n<td colspan='2' class='fcaption'>{BACKLINK}\n</td>\n</tr>\n{USERBOX}\n{SUBJECTBOX}\n<tr>\n<td class='forumheader2' style='width:20%'>{POSTTYPE}</td>\n<td class='forumheader2' style='width:80%'>\n{POSTBOX}<br />\n{EMAILNOTIFY}<br />\n{NOEMOTES}<br />\n{POSTTHREADAS}\n</td>\n</tr>\n{POLL}\n{FILEATTACH}\n\n<tr style='vertical-align:top'>\n<td colspan='2' class='forumheader' style='text-align:center'>\n{BUTTONS}\n</td>\n</tr>\n</table>\n{FORMEND}\n\n<table style='" . USER_WIDTH . "'>\n<tr>\n<td>\n{FORUMJUMP}\n</td>\n</tr>\n</table>\n</div></div>\n";
} if (isset($_POST['preview'])) { // Can't have everyone voting if tracking method is user ID if ($_POST['pollUserclass'] == e_UC_PUBLIC && $_POST['storageMethod'] == 2) { $_POST['pollUserclass'] = e_UC_MEMBER; } $poll->render_poll($_POST, "preview"); } if (varset($_POST['edit']) || varset($_GET['mode']) == 'create' && !varset($_POST['submit'])) { $_GET['mode'] = 'create'; if ($_POST['edit']) { edit_poll(); define("POLLACTION", 'edit'); } $poll_total = $sql->db_Select("polls"); $text = $poll->renderPollForm(); $ns->tablerender(POLLAN_MENU_CAPTION . " :: " . POLLAN_2, $text); } if (isset($message)) { $emessage->add($message, E_MESSAGE_SUCCESS); } if (!varset($_POST['edit']) && ($_GET['mode'] == "list" || !$_GET['mode'])) { poll_list(); } require_once e_ADMIN . "footer.php"; function edit_poll() { $sql = e107::getDb(); $id = key($_POST['edit']); if ($sql->db_Select("polls", "*", "poll_id=" . $id)) { $_GET['mode'] = 'create';
if (!defined("USER_WIDTH")) { define("USER_WIDTH", "width:95%"); } // the user box and subject box are not always displayed, therefore we need to define them /in case/ they are, if not they'll be ignored. if (!isset($userbox)) { $userbox = "<tr>\n<td class='forumheader2' style='width:20%'>" . LAN_61 . "</td>\n<td class='forumheader2' style='width:80%'>\n<input class='tbox' type='text' name='anonname' size='71' value='" . $anonname . "' maxlength='20' />\n</td>\n</tr>"; } if (!isset($subjectbox)) { $subjectbox = "<tr>\n<td class='forumheader2' style='width:20%'>" . LAN_62 . "</td>\n<td class='forumheader2' style='width:80%'>\n<input class='tbox' type='text' name='subject' size='71' value='" . $subject . "' maxlength='100' />\n</td>\n</tr>"; } // the poll is optional, be careful when changing the values here, only change if you know what you're doing ... if (!isset($poll_form)) { if (is_readable(e_PLUGIN . "poll/poll_class.php")) { require_once e_PLUGIN . "poll/poll_class.php"; $pollo = new poll(); $poll_form = $pollo->renderPollForm("forum"); } } // finally, file attach is optional, again only change this if you know what you're doing ... if (!isset($fileattach)) { $fileattach = "<tr><td colspan='2' class='nforumcaption2'>" . ($pref['image_post'] ? LAN_390 : LAN_416) . "</td></tr>\n<tr><td style='width:20%' class='forumheader3'>" . LAN_392 . "</td>\n<td style='width:80%' class='forumheader3'>" . LAN_393 . " | " . $allowed_filetypes . " |<br />" . LAN_394 . "<br />" . LAN_395 . ": " . ($pref['upload_maxfilesize'] ? $pref['upload_maxfilesize'] . LAN_396 : ini_get('upload_max_filesize')) . "\n<br />\n\n<div id='fiupsection'>\n<span id='fiupopt'><input class='tbox' name='file_userfile[]' type='file' size='47' /></span>\n</div>\n<input class='button' type='button' name='addoption' value='" . LAN_417 . "' onclick=\"duplicateHTML('fiupopt','fiupsection')\" />\n</td>\n</tr>\n</td>\n</tr>"; } // ------------ if (!isset($FORUMPOST)) { $FORUMPOST = "\n{FORMSTART}\n" . BOXOPEN . "{BACKLINK}" . BOXMAIN . "\n\n<div style='text-align:center'>\n<table style='width:100%' class='fborder'>\n{USERBOX}\n{SUBJECTBOX}\n<tr>\n<td class='forumheader2' style='width:20%; vertical-align:top;'>{POSTTYPE}</td>\n<td style='width:80%'>\n{POSTBOX}<br />{EMAILNOTIFY}<br />{POSTTHREADAS}\n</td>\n</tr>\n{POLL}\n{FILEATTACH}\n<tr style='vertical-align:top'>\n<td colspan='2' class='nforumcaption2' style='text-align:center'>\n{BUTTONS}\n</table>\n{FORMEND}\n</div>\n{FORUMJUMP}" . BOXCLOSE; } if (!isset($FORUMPOST_REPLY)) { $FORUMPOST_REPLY = "\n<div style='text-align:center'>\n<div class='spacer'>\n{FORMSTART}\n<table style='" . USER_WIDTH . "' class='fborder'>\n<tr>\n<td colspan='2' class='fcaption'>{BACKLINK}\n</td>\n</tr>\n{USERBOX}\n{SUBJECTBOX}\n<tr>\n<td class='forumheader2' style='width:20%'>{POSTTYPE}</td>\n<td class='forumheader2' style='width:80%'>\n{POSTBOX}<br />{EMAILNOTIFY}<br />{POSTTHREADAS}\n</td>\n</tr>\n\n{POLL}\n\n{FILEATTACH}\n\n<tr style='vertical-align:top'>\n<td colspan='2' class='forumheader' style='text-align:center'>\n{BUTTONS}\n</td>\n</tr>\n</table>\n{FORMEND}\n\n<table style='" . USER_WIDTH . "'>\n<tr>\n<td>\n{FORUMJUMP}\n</td>\n</tr>\n</table>\n</div></div>\n<div style='text-align:center'>\n{THREADTOPIC}\n{LATESTPOSTS}\n</div>\n"; } if (!isset($LATESTPOSTS_START)) { $LATESTPOSTS_START = "\n<table style='" . USER_WIDTH . "' class='fborder'>\n<tr>\n<td colspan='2' class='fcaption' style='vertical-align:top'>" . LAN_101 . "{LATESTPOSTSCOUNT}" . LAN_102 . "\n</td>\n</tr>";
function sc_poll($parm = '') { if (is_readable(e_PLUGIN . "poll/poll_class.php")) { require_once e_PLUGIN . "poll/poll_class.php"; $pollo = new poll(); $type = $parm == 'front' ? 'front' : 'forum'; $poll_form = $pollo->renderPollForm($type); } if ($this->var['action'] == 'nt' && check_class($this->forum->prefs->get('poll')) && strpos(e_QUERY, 'edit') === false) { if ($parm == 'front') { return $poll_form; } return "<tr><td><a href='#pollform' class='e-expandit'>" . LAN_FORUM_3028 . "</a></td><td>\n\t\t\t<div id='pollform' style='display:none'>\n\t\t\t<table class='table table-striped'>" . $poll_form . "</table></div></td></tr>"; } return ''; }