Ejemplo n.º 1
0
InitFontSizeList();
// --- First thing to do is to check the op get parameter!
// Check for changes first | Abort if Edit is not allowed
if (isset($_GET['op']) && isset($_GET['value'])) {
    if ($_GET['op'] == "enableuserops") {
        $iNewVal = intval($_GET['value']);
        if ($iNewVal == 1) {
            // Set UserOption
            $USERCFG['UserOverwriteOptions'] = 1;
            // Focus the enable user button
            AddWindowLoadFocus("buttonenableuseropt");
        } else {
            // Set UserOption
            $USERCFG['UserOverwriteOptions'] = 0;
            // Focus the disable user button
            AddWindowLoadFocus("buttondisableuseropt");
        }
        // Enable User Options!
        WriteConfigValue("UserOverwriteOptions", false, $content['SESSION_USERID']);
    }
}
// ---
// --- Check if user wants to overwrite
$UserOverwriteOptions = GetConfigSetting("UserOverwriteOptions", 0, CFGLEVEL_USER);
if ($UserOverwriteOptions == 1) {
    $content['ENABLEUSEROPTIONS'] = true;
} else {
    $content['ENABLEUSEROPTIONS'] = false;
}
// ---
// Check for changes first | Abort if Edit is not allowed
Ejemplo n.º 2
0
            $myChart['chart_defaultfilter_urldecoded'] = urlencode($myChart['chart_defaultfilter']);
        } else {
            $myChart['chart_defaultfilter_urldecoded'] = "";
        }
        // ---
        // --- Set CSS Class
        if ($i % 2 == 0) {
            $myChart['cssclass'] = "line1";
        } else {
            $myChart['cssclass'] = "line2";
        }
        $i++;
        // ---
        // --- Check if Enable/Disable Button was clicked and add Autofocus code!
        if (isset($content['CHARTID']) && $content['CHARTID'] == $myChart['ID']) {
            AddWindowLoadFocus("chartenablebutton" . $myChart['ID']);
        }
        // ---
    }
    // ---
}
// --- END Custom Code
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_CHARTOPT'];
// --- END CREATE TITLE
// --- Parsen and Output
InitTemplateParser();
$page->parser($content, "admin/admin_charts.html");
$page->output();
// ---
Ejemplo n.º 3
0
             break;
         }
         $iArrayNum++;
     }
     // If found move down
     if ($iArrayNum < count($content['SUBMAPPINGS'])) {
         // Extract Entry from the array
         $EntryTwoMove = array_slice($content['SUBMAPPINGS'], $iArrayNum, 1);
         // Unset Entry from the array
         unset($content['SUBMAPPINGS'][$szColId]);
         // Splice the array order!
         array_splice($content['SUBMAPPINGS'], $iArrayNum + 1, 0, $EntryTwoMove);
     }
     // ---
     // Add Focus to MoveDown Button again
     AddWindowLoadFocus("subop_movedown_" . $szColId);
 } else {
     // Now we convert fr DB insert!
     $content['DisplayName'] = DB_RemoveBadChars($_POST['DisplayName']);
     // Everything was alright, so we go to the next step!
     if ($_POST['op'] == "addnewdbmp") {
         // Create Columnlist comma seperated!
         if (isset($_POST['Mappings']) && is_array($_POST['Mappings'])) {
             // Copy columns ID's
             foreach ($_POST['Mappings'] as $myColKey) {
                 if (isset($_POST[$myColKey]) && strlen($_POST[$myColKey]) > 0) {
                     // Get FieldName
                     $myMappingFieldName = DB_StripSlahes($_POST[$myColKey]);
                     if (isset($content['SUBMAPPINGS'])) {
                         $content['SUBMAPPINGS'] .= "," . $myColKey;
                     } else {
Ejemplo n.º 4
0
        }
        // ---
        // --- Set CSS Class
        if ($i % 2 == 0) {
            $content['USERS'][$i]['cssclass'] = "line1";
        } else {
            $content['USERS'][$i]['cssclass'] = "line2";
        }
        // ---
        // --- Check if Enable/Disable Button was clicked and add Autofocus code!
        if (isset($_GET['miniop']) && isset($content['USERID']) && $content['USERID'] == $content['USERS'][$i]['ID']) {
            if ($_GET['miniop'] == "setisadmin") {
                AddWindowLoadFocus("userisadminbutton" . $content['USERS'][$i]['ID']);
            } else {
                if ($_GET['miniop'] == "setisreadonly") {
                    AddWindowLoadFocus("userisreadonlybutton" . $content['USERS'][$i]['ID']);
                }
            }
        }
        // ---
    }
    // ---
}
// Helper function to delete SQL Data
function PerformSQLDelete($szDeleteStm, $szErrMsg, $szUserID)
{
    global $content;
    $result = DB_Query($szDeleteStm);
    if ($result == FALSE) {
        $content['ISERROR'] = true;
        $content['ERROR_MSG'] = GetAndReplaceLangStr($content[$szErrMsg], $szUserID);