array("type"=>"hidden","name"=>"step_id","value"=>$step_id), array("type"=>"radio","name"=>"sex","onchange"=>"this.form.submit();","data"=> array( array("value"=>"m","label"=>"male"), array("value"=>"f","label"=>"female") ) ) ) ); */ if(isset($fields[$step_id])) { $form = new Form(); $form->fields = $fields[$step_id]; echo $form->buildForm(); } // see if user at this IP has an item checked out $sql = "SELECT * FROM turk_activity WHERE last_checkout_ip='".$_SERVER['REMOTE_ADDR']."'"; $result = $db->query($sql); if($db->getNumRows($result)>=1) { $row = $db->getRow($result); $step_id = 3; $_GET['id'] = $row['note_id']; } if($step_id==1) { echo "<h2>Please select a note to read from the list below. Once you've found one, click on it to check it out:</br>(NOTE: items in grey have already been completed or are currently checked-out by other workers. Please, do not read these or you will not be paid. Thank you.)</h2>";
$cID = $consoleObj->findConsoleIDByName("Plugin Manager"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $consoleTitle = $consoleInfo['pagetitle']; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $PAGE_NAME = $pluginInfo['name'] . " Plugin Settings - " . $consoleTitle . " - "; $EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n"; $formObj = new Form(); require BASE_DIRECTORY . "plugins/" . $pluginInfo['filepath'] . "/settings_form.php"; $hooksObj->run("pluginsettings-" . $pluginInfo['filepath']); include BASE_DIRECTORY . "themes/" . $THEME . "/_header.php"; $breadcrumbObj->setTitle($pluginInfo['name'] . " Plugin Settings"); $breadcrumbObj->addCrumb("Home", $MAIN_ROOT); $breadcrumbObj->addCrumb("My Account", $MAIN_ROOT . "members"); $breadcrumbObj->addCrumb($consoleTitle, $MAIN_ROOT . "members/console.php?cID=" . $cID); $breadcrumbObj->addCrumb($pluginInfo['name'] . " Plugin Settings"); include BASE_DIRECTORY . "include/breadcrumb.php"; // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $formObj->buildForm($setupFormArgs); if ($_POST['submit'] && $formObj->save()) { $formObj->saveMessageTitle = $pluginInfo['name'] . " Plugin Settings"; $formObj->showSuccessDialog(); } $formObj->show(); } else { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "login.php';</script>"); } include BASE_DIRECTORY . "themes/" . $THEME . "/_footer.php";
if ($boardObj->objPost->get_info("member_id") == $memberInfo['member_id'] || $blnManagePosts) { $countManagablePosts++; $boardObj->objPost->blnManageable = true; } $boardObj->objPost->show(); } $pageSelector->show(); echo "\n<div class='formDiv' style='background: none; border: 0px; overflow: auto'>\n\t<div style='float: right'>" . $dispManagePosts . $dispPostReply . "</div>\n</div>\n\n"; if (LOGGED_IN && $topicInfo['lockstatus'] == 0) { $forumConsoleObj = new ConsoleOption($mysqli); $postCID = $forumConsoleObj->findConsoleIDByName("Post Topic"); $forumConsoleObj->select($postCID); $postReplyLink = $forumConsoleObj->getLink(); $i = 1; $arrComponents = array("message" => array("type" => "richtextbox", "sortorder" => $i++, "display_name" => "Message", "attributes" => array("id" => "richTextarea", "style" => "width: 90%", "rows" => "10"), "validate" => array("NOT_BLANK")), "submit" => array("type" => "submit", "sortorder" => $i++, "attributes" => array("class" => "submitButton formSubmitButton"), "value" => "Post")); $arrSetupReplyForm = array("name" => "forum-quick-reply", "components" => $arrComponents, "wrapper" => array(), "attributes" => array("method" => "post", "action" => $postReplyLink . "&bID=" . $boardInfo['forumboard_id'] . "&tID=" . $topicInfo['forumtopic_id'])); $quickReplyForm->buildForm($arrSetupReplyForm); echo "\n\n\t\t<div class='formDiv'>\n\t\t\t<b>Quick Reply:</b>\n\n\t\t\t"; $quickReplyForm->show(); echo "\n\t\t</div>\n\t\n\t"; } if ($blnPageSelect) { echo "\n\t\t<script type='text/javascript'>\n\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#btnPageSelectTop, #btnPageSelectBottom').click(function() {\n\t\t\t\t\t\n\t\t\t\t\tvar jqPageSelect = \"#pageSelectBottom\";\n\t\t\t\t\tvar intNewPage = 0;\n\t\t\t\t\t\n\t\t\t\t\tif(\$(this).attr('id') == \"btnPageSelectTop\") {\n\t\t\t\t\t\tjqPageSelect = \"#pageSelectTop\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tintNewPage = \$(jqPageSelect).val();\n\t\t\t\t\t\n\t\t\t\t\twindow.location = 'viewtopic.php?tID=" . $_GET['tID'] . "&pID='+intNewPage;\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t"; } if ($blnManagePosts) { echo "\n\t\t<div id='confirmDeleteTopicDiv' style='display: none'>\n\t\t\t<p align='center' class='main'>\n\t\t\t\tAre you sure you want to delete this topic?<br><br>\n\t\t\t\tAll posts will be deleted within the topic as well.\n\t\t\t</p>\n\t\t</div>\n\t\t<script type='text/javascript'>\n\t\t\tfunction deleteTopic() {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\n\t\t\t\t\t\$('#confirmDeleteTopicDiv').dialog({\n\t\t\t\t\t\ttitle: 'Delete Topic - Confirm Delete',\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/console.php?cID=" . $intManagePostsCID . "&tID=" . $topicInfo['forumtopic_id'] . "&action=delete'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\n\t\t\t}\n\t\t</script>\n\t"; } if ($countManagablePosts > 0) { echo "\n\t\n\t<div id='confirmDeleteDiv' style='display: none'>\n\t\t\t<p align='center' class='main'>\n\t\t\t\tAre you sure you want to delete this post?<br><br>\n\t\t\t</p>\n\t\t</div>\n\t\t<script type='text/javascript'>\n\t\t\tfunction deletePost(intPostID) {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\n\t\t\t\t\t\$('#confirmDeleteDiv').dialog({\n\t\t\t\t\t\ttitle: 'Delete Post - Confirm Delete',\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/console.php?cID=" . $intManagePostsCID . "&pID='+intPostID+'&action=delete'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\n\t\t\t}\n\t\t</script>\n\t"; } include $prevFolder . "themes/" . $THEME . "/_footer.php";
*/ } } $all_notes = Note::getSelect( $note_sort, $note_order ); echo "<div>"; $select_form = new Form(); $select_form->setMethod("get"); $select_form->fields = array( array('name'=>'id','type'=>'select','onchange'=>'this.form.submit();','width'=>'400px','data'=>$all_notes,'value'=>$note->id), array('name'=>'note_sort','type'=>'select','onchange'=>'this.form.submit();','width'=>'400px','data'=>$note_sort_values,'value'=>$note_sort), array('name'=>'note_order','type'=>'select','onchange'=>'this.form.submit();','width'=>'400px','data'=>$note_order_values,'value'=>$note_order) ); echo $select_form->buildForm(null,!is_null($note->id)?"<span style='margin-right: 10px'><a href='?'>Cancel</a></span>":null); echo "</div>"; echo "<div id='form'>"; $form->fields = $fields; $form->setEncType("multipart/form-data"); $form->setFormWrapper("table"); echo $form->buildForm(); $mp3 = "../mp3s/".$note->id.".mp3"; if(file_exists($mp3)) { echo "<div class='preview'>"; echo '<object width="160" height="20" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">'; echo '<param name="src" value="'.$mp3.'">'; echo '<param name="autoplay" value="false">';
exit; } // Types of application components $typeOptions = array("input" => "Input", "largeinput" => "Large-Input", "select" => "Select", "multiselect" => "Multi-Select", "captcha" => "Captcha", "captchaextra" => "Captcha - Extra Distortion", "profile" => "Profile Option"); // Selectable Component Options (when select or multi-select is selected) $acCounter = 0; $additionalComponents = array("optionvalue" => array("type" => "text", "attributes" => array("class" => "formInput textBox", "id" => "optionValue", "style" => "width: 30%"), "display_name" => "Option Value", "html" => "<div class='formInput formInputSideText' style='padding-top: 0px'><input type='button' class='submitButton' value='Add' id='addOptionValueBtn'></div>", "sortorder" => $acCounter++), "optionlist" => array("type" => "custom", "html" => "<div id='optionValueList' class='main formInput' style='height: 75px; overflow: auto'></div>", "sortorder" => $acCounter++, "display_name" => "Option List")); // Profile Option Components $currentCat = "mainprofile"; $profileSelectOptions = array("mainprofile" => "Default Profile Options", "birthday" => "Birthday", "gamesplayed" => "Games Played", "maingame" => "Main Game", "recruiter" => "Recruiter"); $profileCatOptions = array("mainprofile"); $profileCatTable = $dbprefix . "profilecategory"; $profileOptionTable = $dbprefix . "profileoptions"; $query = "SELECT " . $profileCatTable . ".name AS catName, " . $profileCatTable . ".profilecategory_id, " . $profileOptionTable . ".name, " . $profileOptionTable . ".profileoption_id FROM " . $profileOptionTable . ", " . $profileCatTable . " WHERE " . $profileOptionTable . ".profilecategory_id = " . $profileCatTable . ".profilecategory_id ORDER BY " . $profileCatTable . ".ordernum DESC, " . $profileOptionTable . ".sortnum"; $result = $mysqli->query($query); while ($row = $result->fetch_assoc()) { $checkCat = "profilecat_" . $row['profilecategory_id']; if ($currentCat != $checkCat) { $profileSelectOptions[$checkCat] = filterText($row['catName']); $profileCatOptions[] = $checkCat; } $profileSelectOptions[$row['profileoption_id']] = filterText($row['name']); } $profileComponents = array("profileoption" => array("type" => "select", "options" => $profileSelectOptions, "sortorder" => 1, "display_name" => "Select Option", "attributes" => array("class" => "formInput textBox", "id" => "profileOptionID"), "non_selectable_items" => $profileCatOptions)); $dispRequiredValue = isset($appCompInfo) ? $appCompInfo['required'] : "0"; $i = 0; $addAppForm = new Form(); $arrComponents = array("name" => array("display_name" => "Name", "type" => "text", "attributes" => array("class" => "textBox formInput", "id" => "componentName"), "sortorder" => $i++), "type" => array("type" => "select", "options" => $typeOptions, "attributes" => array("class" => "textBox formInput", "id" => "componentType"), "sortorder" => $i++, "display_name" => "Type"), "required" => array("type" => "checkbox", "options" => array(1 => ""), "attributes" => array("class" => "formInput", "id" => "componentRequiredCB"), "sortorder" => $i++, "display_name" => "Required", "html" => "<input type='hidden' id='componentRequired' value='" . $dispRequiredValue . "'><div id='captchaMessage' class='formInput formInputSideText tinyFont' style='padding-top: 0px; display: none'><i>Captcha's are automatically required.</i></div>"), "tooltip" => array("type" => "textarea", "attributes" => array("class" => "textBox formInput", "id" => "componentTooltip"), "sortorder" => $i++, "display_name" => "Tooltip"), "morecomponents" => array("type" => "section", "attributes" => array("id" => "moreComponentOptions", "style" => "display: none"), "components" => $additionalComponents, "options" => array("section_title" => "Selectable Options"), "sortorder" => $i++), "profilecomponents" => array("type" => "section", "attributes" => array("id" => "profileComponentOptions"), "components" => $profileComponents, "sortorder" => $i++, "options" => array("section_title" => "Profile Options"))); $setupAppForm = array("name" => "member-app-setup", "components" => $arrComponents, "wrapper" => ""); $addAppForm->buildForm($setupAppForm); echo "\n\t\n\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\n\t\t\t\t\$('#componentRequiredCB').click(function() {\n\t\t\t\t\t\n\t\t\t\t\tif(\$(this).is(':checked')) {\n\t\t\t\t\t\t\$('#componentRequired').val('1');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\$('#componentRequired').val('0');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t\t\$('#componentType').change(function() {\n\t\t\t\t\n\t\t\t\t\tif(\$('#componentType').val() == 'select' || \$('#componentType').val() == 'multiselect') {\n\t\t\t\t\t\t\$('#moreComponentOptions').show();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\$('#moreComponentOptions').hide();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(\$('#componentType').val() == 'captcha' || \$('#componentType').val() == 'captchaextra') {\n\t\t\t\t\t\t\$('#componentRequiredCB').attr('disabled', 'disabled');\n\t\t\t\t\t\t\$('#captchaMessage').show();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\$('#componentRequiredCB').attr('disabled', false);\n\t\t\t\t\t\t\$('#captchaMessage').hide();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(\$('#componentType').val() == 'profile') {\n\t\t\t\t\t\t\$('#profileComponentOptions').show();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\$('#profileComponentOptions').hide();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\$('#addOptionValueBtn').click(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#optionValueList').fadeOut(250);\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentcache.php', { action: 'add', newOptionValue: \$('#optionValue').val() }, function(data) {\n\t\t\t\t\t\t\$('#optionValueList').html(data);\n\t\t\t\t\t\t\$('#optionValue').val('');\n\t\t\t\t\t\t\$('#optionValueList').fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentcache.php', { }, function(data) {\n\t\t\t\t\t\$('#optionValueList').html(data);\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t\t\$('#componentType').change();\n\t\t\t\t\n\t\t\t});\n\t\t\n\t\t\tfunction deleteOptionValue(intValueKey) {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#optionValueList').fadeOut(250);\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentcache.php', { action: 'delete', deleteOptionKey: intValueKey }, function(data) {\n\t\t\t\t\t\t\$('#optionValueList').html(data);\n\t\t\t\t\t\t\$('#optionValue').val('');\n\t\t\t\t\t\t\$('#optionValueList').fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t</script>\n\t\t\n\t";
<?php if (!defined("MAIN_ROOT")) { exit; } $donationLogForm = new Form(); $maxYear = date("Y") + 10; $maxDate = "new Date(" . $maxYear . ",12,31)"; $dateObj = new DateTime(); $dateObj->setTimestamp($_GET['start']); $dateObj->setTimezone(new DateTimeZone("UTC")); $defaultStartDate = $dateObj->format("M j, Y"); $dateObj->setTimestamp($_GET['end']); $defaultEndDate = $dateObj->format("M j, Y"); $i = 0; $arrComponents = array("sectionLeft" => array("type" => "section", "attributes" => array("style" => "float: left"), "sortorder" => $i++, "components" => array("totaldonated" => array("type" => "custom", "display_name" => "Total Donated", "sortorder" => $i++, "html" => "<div class='formInput'>" . $campaignObj->formatAmount($totalDonated) . "</div>"), "totaldonations" => array("type" => "custom", "display_name" => "Total Donations", "sortorder" => $i++, "html" => "<div class='formInput'>" . $totalDonations . "</div>"))), "sectionRight" => array("type" => "section", "attributes" => array("style" => "float: right; margin-bottom: 10px"), "sortorder" => $i++, "components" => array("startdate" => array("type" => "datepicker", "display_name" => "Start Date", "attributes" => array("style" => "cursor: pointer", "id" => "jsStartDate", "class" => "textBox formInput"), "sortorder" => $i++, "options" => array("changeMonth" => "true", "changeYear" => "true", "dateFormate" => "M d, yy", "minDate" => "new Date(50, 1, 1)", "maxDate" => $maxDate, "yearRange" => "1950:" . $maxYear, "altField" => "realStartDate", "defaultDate" => $defaultStartDate), "value" => $_GET['start'] * 1000), "enddate" => array("type" => "datepicker", "display_name" => "End Date", "attributes" => array("style" => "cursor: pointer", "id" => "jsEndDate", "class" => "textBox formInput"), "sortorder" => $i++, "options" => array("changeMonth" => "true", "changeYear" => "true", "dateFormate" => "M d, yy", "minDate" => "new Date(50, 1, 1)", "maxDate" => $maxDate, "yearRange" => "1950:" . $maxYear, "altField" => "realEndDate", "defaultDate" => $defaultEndDate), "value" => $_GET['end'] * 1000), "filter" => array("type" => "custom", "html" => "<div style='float: right'><br><input type='button' class='submitButton' id='filterButton' value='Show'></div>", "sortorder" => $i++)))); $filterButtonJS = "\n\t\t\$(document).ready(function() {\n\t\t\t\$('#filterButton').click(function() {\n\t\t\t\t\n\t\t\t\twindow.location = '" . MAIN_ROOT . "members/console.php?cID=" . $_GET['cID'] . "&campaignID=" . $_GET['campaignID'] . "&p=log&start='+(\$('#realStartDate').val()/1000)+'&end='+(\$('#realEndDate').val()/1000);\t\t\t\t\n\t\t\t\n\t\t\t});\n\t\t});\n\t"; $setupDonationFormArgs = array("name" => "console-" . $cID . "-donationlog", "components" => $arrComponents, "description" => "Use the form below to filter the dates of donations.", "attributes" => array("action" => $MAIN_ROOT . "members/console.php?cID=" . $cID, "method" => "post"), "wrapper" => array("<div class='formDiv' style='overflow: auto'>", "</div>"), "embedJS" => $filterButtonJS); $donationLogForm->buildForm($setupDonationFormArgs); $donationLogForm->show();