$sysId = '';
$passy = '';
if (isset($_POST['sysId'])) {
    $sysId = $_POST['sysId'];
}
if (isset($_SESSION['servNowPass'])) {
    $passy = passDecrypt(urldecode($_SESSION['servNowPass']));
}
$ticketEntry = '';
$type = $_POST['type'];
if ($type == 'New') {
    newEntry($_POST);
    $ticketEntry = "Sent an Executive Notification regarding this issue: <br/><br/>NEW:" . $_POST['desc'];
} else {
    if ($type == 'Update') {
        updateEntry($_POST);
        $ticketEntry = "Sent an Executive Notification regarding this issue: <br/><br/>" . $_POST['update'];
    } else {
        if ($type == 'Resolve') {
            resolved($_POST);
            $ticketEntry = "Sent an Executive Notification with the resolution: <br/><br/>" . $_POST['update'];
        } else {
            if ($type == 'New/Resolve') {
                newResolved($_POST);
                $ticketEntry = "Sent a New/Resolve Executive Notification with the resolution: <br/><br/>" . $_POST['update'];
            } else {
                if ($type == "Re-open") {
                    reOpen($_POST);
                    $ticketEntry = "Re-opening the corresponding Executive Notification for this issue: <br/><br/>" . $_POST['update'];
                }
            }
Example #2
0
function adminManager_edit_course()
{
    checkPerm('view');
    require_once $GLOBALS['where_lms'] . '/lib/lib.course_managment.php';
    $lang =& DoceboLanguage::createInstance('adminrules', 'framework');
    $adminidst = importVar('adminidst', true, 0);
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $sel = new Course_Manager();
    $sel->setLink('index.php?modname=admin_manager&amp;op=edit_course');
    if (isset($_GET['load']) || isset($_POST['save_selection'])) {
        $course_initial_sel = array();
        $coursepath_initial_sel = array();
        $catalogue_initial_sel = array();
        $query = "\r\n\t\tSELECT id_entry, type_of_entry\r\n\t\tFROM " . $GLOBALS['prefix_fw'] . "_admin_course\r\n\t\tWHERE idst_user = '******'";
        $re_entry = sql_query($query);
        while (list($id, $type) = sql_fetch_row($re_entry)) {
            switch ($type) {
                case "course":
                    $course_initial_sel[$id] = $id;
                    break;
                case "coursepath":
                    $coursepath_initial_sel[$id] = $id;
                    break;
                case "catalogue":
                    $catalogue_initial_sel[$id] = $id;
                    break;
            }
        }
        if (isset($_GET['load'])) {
            $sel->resetCourseSelection($course_initial_sel);
            $sel->resetCoursePathSelection($coursepath_initial_sel);
            $sel->resetCatalogueSelection($catalogue_initial_sel);
        }
    }
    if (isset($_POST['save_selection'])) {
        $re = true;
        $course = $sel->getCourseSelection($_POST);
        $re &= updateEntry($course, $course_initial_sel, 'course', $adminidst);
        $coursepath = $sel->getCoursePathSelection($_POST);
        $re &= updateEntry($coursepath, $coursepath_initial_sel, 'coursepath', $adminidst);
        $catalogue = $sel->getCatalogueSelection($_POST);
        $re &= updateEntry($catalogue, $catalogue_initial_sel, 'catalogue', $adminidst);
        Util::jump_to('index.php?modname=admin_manager&amp;op=view&amp;result=' . ($re ? 'ok' : 'err'));
    }
    if (isset($_POST['undo_pref'])) {
        Util::jump_to('index.php?modname=admin_manager&amp;op=view');
    }
    $out->addStart(getTitleArea($lang->def('_ADMIN_MANAGMENT'), 'admin_managmer', $lang->def('_ADMIN_MANAGMENT')) . '<div class="std_block">' . Form::openForm('admin_menu_editing', 'index.php?modname=admin_manager&amp;op=edit_course') . Form::getHidden('adminidst', 'adminidst', $adminidst), 'content');
    $out->addEnd(Form::openButtonSpace() . Form::getButton('save_selection', 'save_selection', $lang->def('_SAVE')) . Form::getButton('undo_pref', 'undo_pref', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
    $sel->loadSelector();
}
        //echo "$key - $value<br>";
        // add key (element/column name) and value to queryString array
        $queryString[] = "{$key} = '{$value}'";
        //var_dump($queryString);
    }
    // get string from elements of queryString array
    $implodedArray = implode(', ', $queryString);
    $query = "UPDATE tbl_entries SET {$implodedArray} WHERE id = {$_SESSION['event_id']}";
    //print_r($query);
    $result = mysqli_query($link, $query) or trigger_error(mysqli_error());
    return $result;
    mysqli_close($link);
}
// updateEntry()
if (isset($_POST['btnUpdateEntry'])) {
    // update entry
    $queryResult = updateEntry($link);
    // assign message to query result
    $message = $queryResult ? '<span class="fi-asterisk alertHeader" aria-hidden="true"></span><h2>Success!</h2> Entry has been updated.' : '<span class="fi-asterisk alertHeader" aria-hidden="true"></span><h2>Warning!</h2> System error, entry not submitted. Please try again.';
    $messageSpanClass = $queryResult ? 'info' : 'alert';
    // display query result message
    $queryAlert = '<div data-alert class="alert-box ' . $messageSpanClass . '">
	                ' . $message . '
	                <a href="#" class="close">&times;</a>
                </div>
		<script>$(".alert-box").hide().prependTo("#formEditEntry").slideDown(800, "swing");</script>
	';
    // get entry data, store in array for display
    $entryData = displayEntry($link);
}
// isset($_POST['btnUpdateEntry'])
Example #4
0
        if ($_POST['permalink'] == '') {
            $entry['slogan'] = '';
        }
    }
    $entry['acceptcomment'] = empty($_POST['acceptcomment']) ? 0 : 1;
    $entry['accepttrackback'] = empty($_POST['accepttrackback']) ? 0 : 1;
    $entry['published'] = empty($_POST['published']) ? 0 : $_POST['published'];
    $entry['draft'] = 0;
    if (strpos($entry['slogan'], 'TCDraftPost') === 0) {
        $entry['slogan'] = $entry['title'];
    }
    if (empty($suri['id'])) {
        if ($id = addEntry($blogid, $entry)) {
            fireEvent('AddPost', $id, $entry);
            Setting::setBlogSetting('LatestEditedEntry_user' . getUserId(), $id, true);
            $result = array();
            $result['error'] = ($id !== false) === true ? 0 : 1;
            $result['entryId'] = $id;
            Respond::PrintResult($result);
            exit;
        }
    } else {
        if ($id = updateEntry($blogid, $entry, $updateDraft)) {
            fireEvent('UpdatePost', $id, $entry);
            Setting::setBlogSetting('LatestEditedEntry_user' . getUserId(), $suri['id'], true);
            Respond::ResultPage(0);
            exit;
        }
    }
}
Respond::ResultPage(-1);
            echo $data['text'];
            ?>
</textarea>
<input type="submit" value="<?php 
            echo $lang['mod/submit'];
            ?>
" />
</form>
<?php 
            $mitsuba->admin->ui->endSection();
            ?>
<br />
	<?php 
        } else {
            $mitsuba->admin->ui->checkToken($_POST['token']);
            updateEntry($conn, 1, $_GET['b'], $_POST['who'], $_POST['title'], $_POST['text']);
            $mitsuba->admin->ui->startSection($lang['mod/post_updated']);
            ?>
<a href="?/news"><?php 
            echo $lang['mod/back'];
            ?>
</a><?php 
            $mitsuba->admin->ui->endSection();
            ?>
		<?php 
        }
    } else {
        ?>
	<meta http-equiv="refresh" content="0;URL='?/news'" />
	<?php 
    }
<?php

defined('_JEXEC') or die('Restricted access');
switch (JRequest::getVar('task')) {
    case 'edit':
        editEntry();
        break;
    case 'update':
        updateEntry();
        break;
    default:
        displayEntries();
        break;
}
function updateEntry()
{
    JToolBarHelper::title(JText::_('Update Guestbook Entry'), 'addedit.png');
    $db =& JFactory::getDBO();
    $fldMessage = "'" . $db->getEscaped(JRequest::getVar('message')) . "'";
    $fldLocation = "'" . $db->getEscaped(JRequest::getVar('location')) . "'";
    $fldID = "'" . $db->getEscaped(JRequest::getVar('id')) . "'";
    $insertFields = "UPDATE #__guestbook " . " SET message =" . $fldMessage . "," . " location=" . $fldLocation . " WHERE id = " . $fldID;
    $db->setQuery($insertFields, 0);
    $db->query();
    echo "<h3> Field updated! </h3>";
    echo "<a href ='index.php?option=com_guestbook'> Return to GuestBook List </a>";
}
function displayEntries()
{
    JToolBarHelper::title(JText::_('Guest Book Entries'), 'addedit.png');
    $db =& JFactory::getDBO();
Example #7
0
        if (empty($input)) {
            $method = "";
            //blank out the method if the user hit create without entering any text - just pretend nothing ever happened
        } else {
            $entry = addEntry($input, $title, $desc);
            if (!is_null($entry)) {
                header('Location: ' . GMF_PATH . $entry->hash . '/' . $entry->editor_hash);
                die;
            }
        }
    } else {
        if ($method == "update") {
            if (!empty($_POST['hash']) && !empty($_POST['ehash'])) {
                $hash = $_POST['hash'];
                $editor_hash = $_POST['ehash'];
                $entry = updateEntry($hash, $editor_hash, $input, $title, $desc);
                header('Location: ' . GMF_PATH . $entry->hash . '/' . $entry->editor_hash);
                die;
            }
        }
    }
}
?>

<html>
	<head>
		<title>
			<?php 
echo "GMSnippet";
if ($method === "display" || $method === "preview") {
    echo " - " . $title;
Example #8
0
{
    $c = new Entry();
    return $c->getFields();
}
/* </functions> */
$action = Functions::get('action');
Functions::checkRights(__FILE__, $action, Functions::get('token'));
switch ($action) {
    case 'fields_info':
        $data = infoFields();
        break;
    case 'new':
        $data = addEntry();
        break;
    case 'update':
        $data = updateEntry(Functions::get('id'));
        break;
    case 'info':
        $data = infoEntry(Functions::get('id'));
        break;
    case 'delete':
        $data = deleteEntry(Functions::get('id'));
        break;
    case 'customer_history':
        $data = getCustomerHistory(Functions::get('id'));
        break;
    case 'list':
        $data = listEntries();
        break;
    default:
        Functions::setResponse(400);
Example #9
0
$numEntries = getIndexNum();
$cookie = $_COOKIE['dertyn'];
$storedcookie = getCookie();
$id = $_GET['number'];
$type = $_GET['type'];
if (ereg($type, "^rich\$")) {
    include_once "editor.php";
}
?>

<?php 
if (checkCookie()) {
    showEditForm($id);
} else {
    echo "please <a href=\"login.php\">login</a>.";
}
if (checkCookie() && $_POST['checksubmit']) {
    $subject = strip_tags($_POST['subject']);
    $body = $_POST['body'];
    $draft = strip_tags($_POST['draft']);
    $updateID = strip_tags($_POST['id']);
    updateEntry($subject, $body, $updateID, $draft);
    echo " <img src=\"icon_accept.gif\" border=\"0\" /> entry updated. ";
}
?>

<?php 
include_once "footer.php";
?>