Exemplo n.º 1
0
    }
}
// Default
if (isset($_POST['op']) && $_POST['op'] == "login") {
    // Perform login!
    if ($_POST['op'] == "login") {
        if (isset($_POST['uname']) && strlen($_POST['uname']) > 0 && (isset($_POST['pass']) && strlen($_POST['pass']) > 0)) {
            // Set Username and password
            $content['uname'] = DB_RemoveBadChars($_POST['uname']);
            $content['pass'] = $_POST['pass'];
            // RAW Copy of password string, otherwise passwords with special characters can be broken.
            if (!CheckUserLogin($content['uname'], $content['pass'])) {
                $content['ISERROR'] = "true";
                $content['ERROR_MSG'] = $content['LN_LOGIN_ERRWRONGPASSWORD'];
            } else {
                RedirectPage(urldecode($szRedir));
            }
        } else {
            $content['ISERROR'] = "true";
            $content['ERROR_MSG'] = $content['LN_LOGIN_USERPASSMISSING'];
        }
    }
} else {
    if (isset($_GET['op']) && $_GET['op'] == "logoff") {
        // logoff in this case
        DoLogOff();
    }
}
// --- END Custom Code
// --- CONTENT Vars
$content['REDIR_LOGIN'] = $szRedir;
Exemplo n.º 2
0
            if (strpos($_GET['filter_source'], " ") === false) {
                $content['searchstr'] .= "source:" . $_GET['filter_source'] . " ";
            } else {
                $content['searchstr'] .= "source:" . str_replace(" ", ",", $_GET['filter_source']) . " ";
            }
        }
        // Message is just appended
        if (isset($_GET['filter_message']) && strlen($_GET['filter_message']) > 0) {
            $content['searchstr'] .= $_GET['filter_message'];
        }
    }
    // Append sourceid if needed
    if (isset($_GET['sourceid']) && isset($content['Sources'][$_GET['sourceid']])) {
        $sourceidstr = "&sourceid=" . $_GET['sourceid'];
    } else {
        $sourceidstr = "";
    }
    // Redirect to the index page now!
    RedirectPage("index.php?filter=" . urlencode(trim($content['searchstr'])) . "&search=Search" . $sourceidstr);
}
// ---
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
// Append custom title part!
$content['TITLE'] .= " :: Search";
// --- END CREATE TITLE
// --- Parsen and Output
InitTemplateParser();
$page->parser($content, "search.html");
$page->output();
// ---
function DoLogOff()
{
    global $content;
    //added by czhujer
    $sqlquery = "DELETE FROM `logcon_users` WHERE `username` LIKE '" . $_SESSION['SESSION_USERNAME'] . "'";
    $result = DB_Query($sqlquery);
    //end
    unset($_SESSION['SESSION_LOGGEDIN']);
    unset($_SESSION['SESSION_USERNAME']);
    unset($_SESSION['SESSION_USERID']);
    unset($_SESSION['SESSION_ACCESSLEVEL']);
    // Redir to Index Page
    RedirectPage("index.php");
}
Exemplo n.º 4
0
				 if($sectortrab == '') $sectortrab = trim($cols["E"]);
				 if($puestotrab == '') $puestotrab = '';
				 $arrayRiesgos = '';
	
				GrabarRegistroNomina(0, $idEstablecimiento, $cuilTrabajador, $nombre, $fechaingreso, $fechainiexpo, $sectortrab, $puestotrab, $arrayRiesgos);
				$_SESSION['arrayXLSReportOK'] .= $cuilTrabajador.' <p/>';		
				$CountRegImport++;
			}	
		}
		
		if($CountRegInsert == 0){
			//echo 'Archivo vacio. Sin trabajadores (recorrido)';			
			$errores = 'Archivo vacio, sin trabajadores (debe completar el archivo '.$nombre_fichero.')';		
			addTextReport(" <div> ".$errores."  </div> <p/>");						
			RedirectPage();
		}
		
		if($CountRegImport > 0)
			$_SESSION['arrayXLSReportOK'] = 'Cantidad importados: '.$CountRegImport.'<p>';				
			
		RedirectPage();
	
} catch (Exception $e) {
	DBRollback($conn);
	SalvarErrorTxt( __FILE__, __FUNCTION__ , __LINE__, $e->getMessage() );
	addTextReport(" <div> ".utf8_encode( $e->getMessage() )."  </div> <p/>");						
	RedirectPage();	
	exit;
}

Exemplo n.º 5
0
        $newViewID = $_GET['viewid'];
        if (isset($content['Views'][$newViewID]) && isset($_SESSION['currentSourceID'])) {
            // Save new View into session!
            $_SESSION[$_SESSION['currentSourceID'] . "-View"] = $newViewID;
        } else {
            // DEBUG
            echo "DEBUG: " . $_SESSION['currentSourceID'] . " - " . htmlspecialchars($newViewID);
            exit;
        }
    }
    if ($_GET['op'] == "maximize" && isset($_GET['max'])) {
        if (intval($_GET['max']) == 1) {
            $_SESSION['SESSION_MAXIMIZED'] = true;
        } else {
            $_SESSION['SESSION_MAXIMIZED'] = false;
        }
    }
    if ($_GET['op'] == "changepagesize" && isset($_GET['pagesizeid'])) {
        if (intval($_GET['pagesizeid']) >= 0 && intval($_GET['pagesizeid']) < count($content['pagesizes'])) {
            $_SESSION['PAGESIZE_ID'] = intval($_GET['pagesizeid']);
        }
    }
    if ($_GET['op'] == "autoreload" && isset($_GET['autoreloadtime'])) {
        if (intval($_GET['autoreloadtime']) >= 0 && intval($_GET['autoreloadtime']) < count($content['reloadtimes'])) {
            $_SESSION['AUTORELOAD_ID'] = intval($_GET['autoreloadtime']);
        }
    }
}
// Final redirect
RedirectPage($szRedir);
// ---
Exemplo n.º 6
0
function DoLogOff()
{
    global $content;
    unset($_SESSION['SESSION_LOGGEDIN']);
    unset($_SESSION['SESSION_USERNAME']);
    unset($_SESSION['SESSION_USERID']);
    unset($_SESSION['SESSION_ACCESSLEVEL']);
    // Redir to Index Page
    RedirectPage("index.php");
}