Ejemplo n.º 1
0
 function add_section()
 {
     do_form_header("screenshots.php");
     do_table_header("Add Section");
     do_text_row("Title", "title");
     do_submit_row("Add Section");
     echo '<input type="hidden" name="do" value="add_section_confirm">';
     do_table_footer();
     do_form_footer();
 }
Ejemplo n.º 2
0
 function sql_query()
 {
     do_form_header("dbtools.php");
     do_table_header("SQL Query Tool");
     echo '<tr><td class="formlabel"><textarea name="query" rows="5" cols="50"></textarea><br />';
     echo 'Please do not enter more than one query at a time.</td></tr>';
     do_submit_row("Go");
     do_table_footer();
     echo '<input type="hidden" name="do" value="run_query">';
     do_form_footer();
 }
Ejemplo n.º 3
0
function edit_template($title)
{
    global $db;
    do_table_header("Manage Templates");
    $result = $db->Execute("SELECT * FROM Obsedb_templates WHERE `title` = '{$title}';");
    do_form_header('templates.php');
    do_blank_row("Editing Template");
    print "<tr><td class=\"formlabel\">\n" . "<textarea rows=\"20\" cols=\"70\" name=\"html\">" . stripslashes($result->fields['html']) . "</textarea></td></tr>";
    do_submit_row("Save Template");
    print '<input type="hidden" name="title" value="' . $title . '">';
    print '<input type="hidden" name="do" value="save">';
    do_table_footer();
    do_form_footer();
}
Ejemplo n.º 4
0
    do_submit_row('Install');
    do_table_footer();
    echo '<input type="hidden" name="do" value="install2">';
    do_form_footer();
}
if ($_REQUEST['do'] == 'install2') {
    $record["title"] = $_REQUEST['title'];
    $record["url"] = $_REQUEST['filename'];
    $db->AutoExecute("Obsedb_modules", $record, 'INSERT');
    SPMessage('Success | Module has been added to control panel', 'modules.php');
}
if ($do == 'edit') {
    $result = $db->Execute("\n        SELECT * FROM Obsedb_modules\n        WHERE `id` = '{$id}'");
    do_form_header('modules.php');
    do_table_header('Module Configuration');
    do_text_row('Name', 'title', stripslashes($result->fields['title']));
    do_text_row('Target', 'url', stripslashes($result->fields['url']));
    do_submit_row('Save Changes');
    do_table_footer();
    print '<input type="hidden" name="do" value="edit_confirm">';
    print '<input type="hidden" name="id" value="' . $id . '">';
    do_form_footer();
}
if ($do == 'edit_confirm') {
    $title = $cp->getParam('title');
    $url = $cp->getParam('url');
    $record = array('title' => $title, 'url' => $url);
    $db->AutoExecute('Obsedb_modules', $record, "UPDATE", "`id` = '{$id}'");
    SPMessage("Module configuration has been saved.");
}
$cp->footer();
Ejemplo n.º 5
0
 function main()
 {
     global $db;
     $sections = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');
     do_table_header('View all companies by title');
     echo "<tr><td class=\"formlabel\">";
     foreach ($sections as $key => $value) {
         echo "<b><a href=\"companies.php?s={$value}\">{$value}</a></b> &nbsp;";
     }
     echo "</td></tr>";
     do_table_footer();
     do_form_header('companies.php');
     do_table_header('All Companies');
     if (isset($_REQUEST['s'])) {
         $where = "WHERE Obsedb_companies.title LIKE '" . $_REQUEST[s] . "%'";
     }
     $result = $db->Execute("SELECT Obsedb_companies.id,Obsedb_companies.title,Obsedb_companies.homepage\n\t\t\t\t\t\tFROM Obsedb_companies\n\t\t\t\t\t\t{$where}\n\t\t\t\t\t\tORDER BY Obsedb_companies.title;");
     echo '<tr>';
     echo '<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #808080; border-top: 1px solid #808080;"><b>Title</b></td>';
     echo '<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #808080; border-top: 1px solid #808080;"><b>Homepage</b></td>';
     echo '</tr>';
     while ($row = $result->FetchNextObject()) {
         $bgcolor = $bgcolor == "#FFFFFF" ? "#F1EFE2" : "#FFFFFF";
         echo '<tr><td bgcolor="' . $bgcolor . '">';
         echo '<label for="id' . $row->ID . '">';
         echo '<input type="radio" id="id' . $row->ID . '" name="id" VALUE="' . $row->ID . '">' . stripslashes($row->TITLE);
         echo '</label>';
         echo '</td>';
         echo '<td bgcolor="' . $bgcolor . '">' . stripslashes($row->HOMEPAGE) . '</td>';
         echo '</tr>';
     }
     echo '<tr><td colspan="2" bgcolor="#FFFFFF">';
     echo '<input type="submit" name="do" value="Edit Company">';
     echo '<input type="submit" name="do" value="Delete Company">';
     echo '<input type="submit" name="do" value="View Matrix">';
     echo '</tr></td>';
     do_table_footer();
     do_form_footer();
 }
 function edit_phrases($category, $label)
 {
     global $db, $cp;
     $phrases = $cp->getPhrases($category);
     do_form_header('configuration.php');
     do_table_header($label);
     foreach ($phrases as $key => $value) {
         do_text_row($key, $key, $value);
     }
     do_submit_row('Save Phrases');
     do_table_footer();
     print "<input type=\"hidden\" name=\"category\" value=\"" . $category . "\">";
     print "<input type=\"hidden\" name=\"do\" value=\"save_phrases\">";
     do_form_footer();
 }
Ejemplo n.º 7
0
 function add_poll()
 {
     global $db;
     do_form_header('polls.php');
     do_table_header('Add New Poll');
     do_text_row('Title', 'title');
     do_table_footer();
     do_table_header('Poll Options');
     do_text_row('Option 1', 'option1');
     do_text_row('Option 2', 'option2');
     do_text_row('Option 3', 'option3');
     do_text_row('Option 4', 'option4');
     do_text_row('Option 5', 'option5');
     do_text_row('Option 6', 'option6');
     do_text_row('Option 7', 'option7');
     do_text_row('Option 8', 'option8');
     do_text_row('Option 9', 'option9');
     do_text_row('Option 10', 'option10');
     do_submit_row('Add Poll');
     do_table_footer();
     echo '<input type="hidden" name="do" value="add_poll_confirm">';
     do_form_footer();
     echo "You may add more options later if you need more than ten.";
 }
Ejemplo n.º 8
0
function edit_section()
{
    global $db;
    $result = $db->Execute("SELECT * FROM Obsedb_screenshots_sections WHERE id = {$_REQUEST['id']}");
    if ($result) {
        $row = $result->FetchRow();
        do_form_header("screenshots.php");
        do_table_header("Edit Section");
        do_text_row("Title", "title", stripslashes($row[title]));
        do_submit_row("Update");
        echo '<input type="hidden" name="do" value="edit_section_confirm">';
        echo '<input type="hidden" name="id" value="' . $row[id] . '">';
        do_table_footer();
        do_form_footer();
    }
}
Ejemplo n.º 9
0
 function edit_settings()
 {
     global $db, $LANG, $spconfig;
     do_form_header('Mods.php');
     do_table_header($LANG['Mods_config']);
     $options = array('0' => $LANG['disabled'], '1' => $LANG['enabled']);
     do_select_row($LANG['show_tools'], 'Mod_tools', $options, $spconfig['Mod_tools']);
     do_select_row($LANG['popup_tools'], 'Mod_tools_popups', $options, $spconfig['Mod_tools_popups']);
     do_submit_row($LANG['save_settings']);
     do_table_footer();
     echo '<input type="hidden" name="do" value="save_settings">';
     do_form_footer();
 }
Ejemplo n.º 10
0
 function edit()
 {
     global $db;
     $result = $db->Execute("SELECT * FROM Obsedb_customfields WHERE id = {$_REQUEST['id']};");
     $field = $result->FetchRow();
     do_form_header('customfields.php');
     do_table_header('Edit Custom Field');
     do_text_row('Field Name', 'title', stripslashes($field['title']));
     echo '<tr>' . '<td class="formlabel" align="right"><b>Module</b></td>' . '<td class="formlabel">' . '<select name="module">';
     if ($field['module'] == 'Mods') {
         echo '<option value="Mods" selected>Mods Manager</option>';
     } else {
         echo '<option value="Mods">Mods Manager</option>';
     }
     echo '</select>' . '</td></tr>';
     echo '<tr>' . '<td class="formlabel" align="right"><b>Field Type</b></td>' . '<td class="formlabel">' . '<select name="type">';
     if ($field['type'] == 'text') {
         echo '<option value="text" selected>Single-Line Text Box</option>';
     } else {
         echo '<option value="text">Single-Line Text Box</option>';
     }
     if ($field['type'] == 'textarea') {
         echo '<option value="textarea" selected>WYSIWYG Editor</option>';
     } else {
         echo '<option value="textarea">WYSIWYG Editor</option>';
     }
     echo '</select>' . '</td></tr>';
     do_submit_row('Update');
     do_table_footer();
     echo '<input type="hidden" name="do" value="edit_confirm">';
     echo '<input type="hidden" name="id" value="' . $_REQUEST['id'] . '">';
     do_form_footer();
 }