Example #1
0
} else {
    // skip the alert the second time though
    if (isset($_GET['con']) || saniTize($_POST['director']) == true) {
        $director = true;
    } else {
        header("Location: alert?gsnc=yes");
        //exit;
    }
}
if ($group === null) {
    $group = $defaultString;
}
$title = $titleString[$group];
$head = $headString[$group];
$link = $linkString[$group];
$subcount = subCount($name, getGroupNumber($group));
$validSubMsg = null;
$magWrd = null;
$submit = null;
if (!array_key_exists('magword', $_POST)) {
    $_POST = array('magword' => null, 'submit' => null);
} else {
    $magWrd = saniTize($_POST['magword']);
    $submit = saniTize($_POST['submit']);
}
// now this is a little nutty
if ($magWrd === $magicword_2) {
    $magWrd = $magicword;
}
if ($magWrd !== $magicword || !$name || !$email) {
    if (!$email && $submit) {
Example #2
0
        <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Профиль <?php 
echo $_COOKIE['emc-login'];
echo ' (' . getGroupName($_COOKIE['emc-login'], $bd) . ')';
?>
</h3>
            </div>
			   <div class="panel-body">
              <img src="/engine/templates/<?php 
echo $tpl_name;
?>
/skin.png" class="pull-left top5 imgCom img-rounded img-responsive" width="90">&nbsp;&nbsp;&nbsp;&nbsp;
              <a href="">Профиль</a>
              <br>&nbsp;&nbsp;&nbsp;&nbsp;
              <a href="">ЛК</a>
              <br>&nbsp;&nbsp;&nbsp;&nbsp;
              <a href="">Магазин Блоков</a>
              <br>&nbsp;&nbsp;&nbsp;&nbsp;
              <?php 
if (getGroupNumber($_COOKIE['emc-login'], $bd) == 9) {
    ?>
 
              <a href="/do/admin">Admin-панель</a><br>&nbsp;&nbsp;&nbsp;&nbsp; 
              <?php 
}
?>
              <br>
              <br>
              <button class="btn btn-success top10 btn-block" type="submit" onclick="document.location.href = '/?do=logout'">Выйти</button>
          </div></div>
Example #3
0
     exit;
 }
 // if file is up move to defined folder
 $success = move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path);
 // check for 32-bit file
 $result = isSub_32bit($target_path);
 if ($result !== true) {
     rename($target_path, '../dump/' . $submissionNameGrpTyp . $fileName . '.x');
     header('Location: alert.php?32bit=no');
     exit;
 }
 $dateTimeString = date("l F j, Y @ g:i:s a T");
 // if successful and if not
 if ($success) {
     // create a group - type variable
     $grp_type = getGroupNumber($group) . '-' . $_POST['type'];
     // create submission information file for automation
     createSubInfo($name, $grp_type, $email, $dirString);
     // build page display message for user submission
     // note double quotes to parse variable into string
     $message = "The file \" {$fileName}  \" has been uploaded<br />" . "for submitter: {$name} &nbsp; group: {$title} <br />" . '<br />' . '<b>The submission may take several hours to post.</b><br />' . '<br />' . 'for questions contact the ' . '<a href="mailto:ebobtron@aol.com" class="head-links" style="font-size:1.3em">' . 'administrator</a><br /><br />';
     // build email message string note double quotes to parse the variables
     // into the string.
     $emailBody = "Received a submission from: {$name}  Group: {$title}  Contact: {$email} on: " . "{$dateTimeString} \r\n";
     // open log file for appending
     $outFileHandle = fopen('../logs/submission.log', 'a');
     // write message to file
     fwrite($outFileHandle, $emailBody);
     // if outFileHandle good close the file
     if ($outFileHandle) {
         fclose($outFileHandle);
                    window.location.reload()
                    </script>';
}
function ClearString($string)
{
    return trim(htmlspecialchars(stripslashes($string)));
}
if (isset($_POST['send-param'])) {
    $login = ClearString($_POST['login-data']);
    $password = md5($_POST['password-data']);
    $res = $bd->query("\n            SELECT password, login, `group`\n            FROM users\n            WHERE login='******' AND password='******'\n            ");
    if ($res->num_rows > 0) {
        $row = mysqli_fetch_assoc($res);
        if ($row['group'] > 0) {
            $password = $row['password'];
            $login = $row['login'];
            $groupid = getGroupNumber($login, $bd);
            setcookie("emc-login", $login);
            setcookie("emc-password", $password);
            setcookie("emc-group", $groupid);
            doRedirect('../');
            exit;
        } else {
            $errorCode = "3";
            echo '<div class="container"><div class="alert alert-warning" style="margin-top: 50px; margin-bottom: -45px" role="alert">Вы не активировали вашу учетную запись!</div></div>';
        }
    } else {
        $errorCode = "2";
        echo '<div class="container"><div class="alert alert-warning" style="margin-top: 50px; margin-bottom: -45px" role="alert">Неправильный логин или пароль!</div></div>';
    }
}