Example #1
0
function t_templates_edit_edit($c)
{
    global $info;
    $s = '';
    foreach ($info as $i) {
        if ($i['edit']) {
            $n = $i['name'];
            // shortcut
            $d = $i['desc'];
            // shortcut
            $s .= "\n                                        <tr>\n                                        <td class=\"item\" align=\"right\" valign=\"top\"><strong><?php echo Horde::label('{$n}', _(\"{$d}\")) ?></strong>&nbsp;</td>\n                                        <td class=\"item\" width=\"100%\">\n                                          " . render_edit($i) . "\n                                        </td>\n</tr>";
        }
    }
    return preg_replace('/!!ZOMBIES!!/', $s, $c);
}
<?php

$dir = dirname(__FILE__);
include "{$dir}/lib/init.php";
verify_auth();
load_plugins();
$instance = getPluginInstance($_GET['id']);
if (!is_object($instance)) {
    die("instance not found");
}
$type = $_GET['ref'];
$instance->checkRequirements();
$smarty->assign('instance', $instance);
$editpage = render_edit($GLOBALS['cfg']['team'], $instance);
$smarty->assign('html', $editpage);
$smarty->display('page_edit.txt');
if ($_POST['channel']) {
    $instance = createPluginInstance($id);
    $instance->iid = $_POST['uid'];
    $instance->onParentInit();
    $instance->onInit();
    $instance->icfg['created'] = time();
    $instance->icfg['creator_id'] = $GLOBALS['cfg']['user']['user_id'];
    $instance->icfg['channel'] = $_POST['channel'];
    $instance->saveConfig();
    header("location: view.php?id={$instance->iid}");
    exit;
}
Example #3
0
     if (post('did_submit') == 'yes') {
         edit_client($client_command, post('first_name'), post('last_name'), post('gender') == '1', post('dob'));
         edit_family($client_command, post('bag'), post('active') == 'true', post('address'), post('telephone'), post('fuel') == 'true', post('usda') == 'true', post('delivery') == 'true', post('dietary') == 'true', post('2nd') == 'true', post('4th') == 'true', post('cooking') == 'true', post('start'), post('comments'));
         clear_financial_aids($client_command);
         $aids = get_all_financial_aids();
         foreach ($aids as $aid) {
             $field = clean_url($aid['name']);
             $check = post('aid-' . $field);
             $amount = post('aid-' . $field . '-text');
             if ($check == 'true') {
                 set_financial_aid($client_command, $aid['aidid'], $amount);
             }
         }
     }
     if (isset($client_command)) {
         render_edit($client_command);
     } else {
         redirect($g["abs_url"] . '/error/invalid-page');
     }
     break;
 case 'render':
     if (isset($client_command) && in_array($client_command, $render_commands)) {
         switch ($client_command) {
             case 'family_members':
                 if (isset($action_command)) {
                     render_family_members($action_command);
                 } else {
                     redirect($g["abs_url"] . '/error/invalid-page');
                 }
                 break;
             default:
Example #4
0
<?php

include_once 'common.php';
if (!isset($_GET['eid'])) {
    echo "Which event???";
    return;
}
$eid = $_GET['eid'];
if (isset($_POST['name'])) {
    $_POST['start_time'] = mktime($_POST['start_time_hour'] + ($_POST['start_time_ampm'] === "pm" ? 12 : 0), $_POST['start_time_min'], 0, $_POST['start_time_month'], $_POST['start_time_day']);
    $_POST['end_time'] = mktime($_POST['end_time_hour'] + ($_POST['end_time_ampm'] === "pm" ? 12 : 0), $_POST['end_time_min'], 0, $_POST['end_time_month'], $_POST['end_time_day']);
    try {
        if ($facebook->api_client->events_edit($eid, json_encode($_POST))) {
            echo "Event successfully edited.";
        } else {
            echo "Event edit failed.";
        }
    } catch (Exception $e) {
        handle_exception($e);
        return;
    }
}
render_edit($eid);