Пример #1
0
function wp_eve_auth_activate()
{
    /* 
     * Add custom options 
     */
    // Corp API key
    add_option('corp_vcode', 'Not Set', '', 'yes');
    add_option('corp_key_id', 'Not Set', '', 'yes');
    // Corp data
    add_option('corp_name', 'Not Set', '', 'yes');
    add_option('corp_id', 'Not Set', '', 'yes');
    add_option('corp_ticker', 'Not Set', '', 'yes');
    // Alliance data
    add_option('alliance_name', 'Not Set', '', 'yes');
    add_option('alliance_id', 'Not Set', '', 'yes');
    add_option('alliance_ticker', 'Not Set', '', 'yes');
    /* 
     * Add custom columns to existing tables 
     */
    add_col('vcode', 'users', '0');
    // Add the vcode column in the users table
    add_col('key_id', 'users', '0');
    // Adds the key id column in the users table
}
Пример #2
0
    $tpl->set_var('cols', 7);
}
phpgw::import_class('phpgwapi.datetime');
$today = date('Ymd', phpgwapi_datetime::user_localtime());
$col_width = 12;
add_col($tpl, '  <td width="2%">&nbsp;</td>');
add_col($tpl, '  <td width="2%">' . add_image_ahref($this->page('day', array('date' => $today)), 'today', lang('Today')) . '</td>');
add_col($tpl, '  <td width="2%" align="left">' . add_image_ahref($this->page('week', array('date' => $today)), 'week', lang('This week')) . '</td>');
add_col($tpl, '  <td width="2%" align="left">' . add_image_ahref($this->page('month', array('date' => $today)), 'month', lang('This month')) . '</td>');
add_col($tpl, '  <td width="2%" align="left">' . add_image_ahref($this->page('year', array('date' => $today)), 'year', lang('This Year')) . '</td>');
if (floor(phpversion()) >= 4) {
    add_col($tpl, '  <td width="2%" align="left">' . add_image_ahref($this->page('planner', array('date' => $today)), 'planner', lang('Planner')) . '</td>');
    $col_width += 2;
}
add_col($tpl, '  <td width="2%" align="left">' . add_image_ahref($this->page('matrixselect'), 'view', lang('Daily Matrix View')) . '</td>');
add_col($tpl, '  <td width="' . (100 - $col_width) . '%" align="left"' . (floor(phpversion()) < 4 ? ' colspan="2"' : '') . '>&nbsp;</td>');
$tpl->parse('row', 'head_table', True);
$tpl->set_var('header_column', '');
$tpl->set_var('cols', $cols);
if ($referrer != 'view') {
    $remainder = 72;
    $date = isset($GLOBALS['date']) ? $GLOBALS['date'] : '';
    $date = isset($GLOBALS['HTTP_GET_VARS']['date']) ? $GLOBALS['HTTP_GET_VARS']['date'] : $date;
    $date = $date == '' && isset($GLOBALS['HTTP_POST_VARS']['date']) ? $GLOBALS['HTTP_POST_VARS']['date'] : $date;
    $base_hidden_vars = '<input type="hidden" name="from" value="' . $GLOBALS['HTTP_GET_VARS']['menuaction'] . '">' . "\n";
    if (isset($GLOBALS['HTTP_GET_VARS']['cal_id']) && $GLOBALS['HTTP_GET_VARS']['cal_id'] != 0) {
        $base_hidden_vars .= '    <input type="hidden" name="cal_id" value="' . $GLOBALS['HTTP_GET_VARS']['cal_id'] . '">' . "\n";
    }
    if (isset($GLOBALS['HTTP_POST_VARS']['keywords']) && $GLOBALS['HTTP_POST_VARS']['keywords']) {
        $base_hidden_vars .= '    <input type="hidden" name="keywords" value="' . $GLOBALS['HTTP_POST_VARS']['keywords'] . '">' . "\n";
    }
Пример #3
0
function msql_modifs($defs, $defsb, $folder, $pre, $node, $basename, $modif)
{
    switch ($modif) {
        case 'restore':
            $defs = read_vars($folder, $node . '_sav', $defsb);
            break;
        case 'import_old':
            $defs = ${$table};
            break;
        case 'del_menus':
            unset($defs['_menus_']);
            break;
        case 'del_file':
            save_vars($folder, $node . '_sav', $defs);
            unlink($basename . '.php');
            relod('/' . $folder . $pre);
            break;
        case 'del_table':
            $r["_menus_"] = $defs["_menus_"];
            $defs = $r;
            break;
            //auto
        //auto
        case 'append_update':
            $defs = append_update($defs, $_GET["append_update"]);
            break;
        case 'import_defs':
            $defs = import_defs($defsb, $_GET["import_defs"]);
            break;
        case 'import_keys':
            $defs = import_keys($defs, $_GET["import_keys"]);
            break;
        case 'merge_defs':
            $defs = merge_defs($defs, $_GET["merge_defs"]);
            break;
        case 'permut':
            $defs = permut($defs, $_GET["permut"]);
            break;
        case 'reset_menus':
            $defs = reset_menus($defs);
            break;
        case 'add_col':
            $defs = add_col($defs);
            break;
        case 'del_col':
            $defs = del_col($defs, $_GET["del_col"]);
            break;
        case 'repair_cols':
            $defs = repair_cols($defs);
            break;
        case 'sort':
            $defs = sort_table($defs, $_GET['sort'], 1);
            $_GET['del_file'] = 1;
            break;
        case 'sort_table':
            $defs = sort_table($defs, $_GET['sort_table']);
            break;
        case 'append_values':
            $defs = append_values($defs, $_GET["append_values"]);
            break;
        case 'del_multi':
            $defs = del_multi($defs);
            break;
        case 'reorder':
            $defs = reorder($defs);
            break;
        case 'add_keys':
            $defs = add_keys($defs);
            break;
        case 'del_keys':
            $defs = del_keys($defs);
            break;
            //post
        //post
        case 'import_conn':
            $defs = import_conn($defs, $_POST["import_conn"], $_POST["aid"]);
            break;
        case 'inject_defs':
            $defs = inject_defs($defs, $_POST["inject_defs"]);
            break;
        case 'edit_csv':
            $defs = edit_csv($defs, $_POST["edit_csv"]);
            break;
        case 'update':
            $defs = update_table($node, $defs);
            break;
        case 'repair':
            $defs = repair($defs);
            break;
        case 'newfrom':
            $defs = new_from_defs($defs, $_GET["newfrom"], $folder, $node);
            break;
            //default:msq_filters($defs,$modif); break;
    }
    if (!$_GET["del_file"] && $defs) {
        save_vars($folder, $node, $defs);
    }
    return $defs;
}