Ejemplo n.º 1
0
function get_trust()
{
    global $ingame, $trusted, $pilotname;
    $browser = $_SERVER["HTTP_USER_AGENT"];
    if (Check()) {
        // check for trust
        if ($_SERVER["HTTP_EVE_TRUSTED"] == 'no') {
            // request trust from client through headers
            header("eve.trustMe:" . $corpURL . "::This page requires " . $corpURL . " to be in the trusted websites in order to show all content. If you do not have this site on trusted, some content will not be displayed correctly!");
            $trusted = false;
        } else {
            // Begin INGAME output
            $trusted = true;
            // Is in Chaos Faction?
            if ($_SERVER["HTTP_EVE_CORPNAME"] != $corp) {
                // Public Content
                include "user.php";
                echo "</body>";
            } else {
                // Corp Content Only
                include "user.php";
                echo "</body>";
            }
            // end corp check
        }
        // end trust check
    }
    // end if check()
}
Ejemplo n.º 2
0
function SSOlogin($appid, $state, $uid)
{
    Check($appid, 'appid');
    if (!empty($state)) {
        Check($state, 'state');
        Check($uid, 'uid');
        $authed = CheckUserAuthed($appid, $uid);
        $appType = GetAppInfo($appid, 'app_type');
        $autoAuth = GetAppInfo($appid, 'auto_auth');
        if ($appType == 'WSC') {
            if ($authed == FALSE && $autoAuth == FALSE) {
                //用户没有授权,且应用不是自动授权,跳转到应用大厅
                if (!empty($_GET['s']) && $_GET['s'] == '1') {
                    /* 加参数跳转到精简版界面 */
                    return IAUTH_SIMPLE_AUTH_CONFIRM_PAGE . '&appsid=' . $appid . '&state=' . $state;
                }
                return URL(IAUTH_APP_INFO_PAGE) . 'appsid=' . $appid . '&state=' . $state . '&showconfirm=yes#confirm';
            }
            if ($authed == FALSE && $autoAuth == TRUE) {
                //用户没有授权,但是应用是自动授权,直接跳回应用的auth_call_back
                $authCallBack = GetAppInfo($appid, 'call_back');
                $rights = Check('2:3:7:11', 'rights');
                /* 由于没有应用大厅,权限被写死 */
                $faile_t = '2036-12-31 23:59:59';
                $verifier = newVerifier('auth', $appid, $uid, $rights, $faile_t, '', '', $state);
                accessLog('AUTH ' . $appid . ' ' . $uid . ' 2:3:7:11 ' . $faile_t . ' ' . $state);
                return URL($authCallBack) . 'verifier=' . $verifier . '&state=' . $state;
            }
            if ($authed == TRUE) {
                /* 用户已经授权,直接跳转回login_call_back */
                $loginCallBack = GetAppInfo($appid, 'login_url');
                $verifier = newVerifier('login', $appid, $uid, 'FROM_CLIENT', '', '', '', $state);
                return URL($loginCallBack) . 'verifier=' . $verifier . '&state=' . $state;
            }
        }
        /* END WSC */
    }
    /* END !EMPTY state */
    /* 其他情况,跳到应用大厅 */
    return URL(IAUTH_APP_INFO_PAGE) . 'appsid=' . $appid;
}
Ejemplo n.º 3
0
<tr>
	<td width=20%>
		Checking gettext:
		<? Check("gettext","Language support", "If you want view Bacula-web in your language, please compile PHP with Gettext");?>
	</td>
</tr>
<tr>
	<td width=20%>
		Checking Pear(DB):
		<? 
			if (@include_once("DB.php") )
				echo "<font color=green>YES</font></td>  <td> Pear DB enabled</td><td>&nbsp;";
			else
				echo "<font color=red>NO</font></td> <td> Pear DB NOT FOUND</td><td>This is required. Please download from <a href=\"http://pear.php.net/package/DB/download\">http://pear.php.net/package/DB/download</a> .";
		?>
	</td>
</tr>
<tr>
	<td>
		Checking GD:
		<?Check("gd_info","GD support", "This is required. Please, compile php with GD support");?>
	</td>
</tr>
</table>
<br><br>

Please, click the link below to test your graph system capabilities (Bacula-web only use PNG): <br>

<a href="external_packages/phplot/examples/test_setup.php" target="_blank">Test</a>
</body>
</html>
Ejemplo n.º 4
0
            } else {
                $p2 = 0;
            }
            if (isset($par3)) {
                $p3 = 1;
            } else {
                $p3 = 0;
            }
            if (isset($par4)) {
                $p4 = 1;
            } else {
                $p4 = 0;
            }
            if (isset($par5)) {
                $p5 = 1;
            } else {
                $p5 = 0;
            }
            if (isset($par6)) {
                $p6 = 1;
            } else {
                $p6 = 0;
            }
            //echo ''.$user['name'].'-'.$p1.'-'.$p2.'-'.$p3.'-'.$p4.'-'.$p5.'-'.$p6.'';
            Check($user['name'], $p1, $p2, $p3, $p4, $p5, $p6);
        }
    } else {
        echo 'Игрок не найден!';
    }
    echo '</table>';
}
Ejemplo n.º 5
0
Archivo: add.php Proyecto: anisinfo/osi
>
                        Risque aggravation
           			</label>
  				</div>
  				<div class=" fl-left">
	  				<label class="lib"><input type="checkbox" id="Incident_dejaApparu" name="Incident_dejaApparu" <?php 
Check('Incident_dejaApparu');
?>
>
                        Déja apparu
            		</label>
            	</div>
            		
            	<div class=" width20 right">
	  				<label class="lib"><input type="checkbox" id="Incident_previsible" name="Incident_previsible" <?php 
Check('Incident_previsible');
?>
>
                        Prévisible
            		</label>
            	</div>
  			</div>

		   	<div class="width50">
		    			<label  class="lib" for="incidentConnex"> Incidents connexes</label> 
		    			<input type="text" name="incidentConnex"  id="incidentConnex" value="<?php 
getVar('incidentConnex');
?>
">
		   	</div>
Ejemplo n.º 6
0
    exec("gpio write {$Pin} 1");
    include "con_db.php";
    $temp = "'" . $Dv_name . "'";
    $sql = "UPDATE `DEVICE` SET `Status` =0 WHERE Name = {$temp}";
    $result = $conn->query($sql);
    echo "{$Dv_name} is off." . "<br>";
}
if (isset($_GET['ON'])) {
    $Status = Check($_GET['ON']);
    if ($Status == 0) {
        TURN_ON($_GET['ON']);
    } elseif ($Status == 1) {
        echo "Error" . "<br>";
    }
} elseif (isset($_GET['OFF'])) {
    $Status = Check($_GET['OFF']);
    if ($Status == 1) {
        TURN_OFF($_GET['OFF']);
    } elseif ($Status == 0) {
        echo "Error" . "<br>";
    }
}
$i = 1;
while ($i <= 4) {
    ?>
	<a>Device <?php 
    echo $i;
    ?>
  </a><a href='php_gpio.php?ON=DEVICE<?php 
    echo $i;
    ?>
Ejemplo n.º 7
0
 function Check($name, $contents, &$errors, $error_name, $count)
 {
     $rec = null;
     if (!isset($contents) || !strlen($contents)) {
         $errors[$error_name] = '<div class="alert alert-danger" role="alert">' . $name . 'を入力してください' . '</div>';
     } else {
         if (strlen($contents) > $count) {
             $errors[$error_name] = '<div class="alert alert-warning" role="alert">' . $name . 'は' . $count . '文字以内で入力してください' . '</div>';
         } else {
             $rec = $contents;
             return $rec;
         }
     }
 }
 $name = Check('名前', $_POST['name'], $errors, 'name', 20);
 $message = Check('メッセージ', $_POST['message'], $errors, 'message', 200);
 //nameCheck
 // $name = null;
 // if(!isset($_POST['name']) || !strlen($_POST['name'])){
 //     $errors['name'] = '名前を入力してください';
 // }else if (strlen($_POST['name']) > 20) {
 //     $errors['name'] = '名前は20文字以内で入力してください';
 // }else {
 //     $name = $_POST['name'];
 // }
 //messageCheck
 // $message = null;
 // if(!isset($_POST['message']) || !strlen($_POST['message'])){
 //     $errors['message'] = 'メッセージを入力してください';
 // }else if (strlen($_POST['message']) > 200) {
 //     $errors['message'] = 'メッセージは200文字以内で入力してください';
Ejemplo n.º 8
0
    }
    if ($row = $db->Query_Fetch_Assoc("SELECT id, password FROM users " . "WHERE login='******' AND is_deleted=0 LIMIT 0,1")) {
        if (isset($_SESSION[S_ID . "_challenge"]["random"]) && md5($_SESSION[S_ID . "_challenge"]["random"] . $row["password"]) == $c_passwd) {
            session_destroy();
            return $row["id"];
        }
    }
    return false;
}
//$msg = '';
if (session_is_registered(S_ID)) {
    header("Location: index.php");
    exit;
}
if (isset($_GET["name"]) && isset($_GET["challenge"])) {
    if ($user_id = Check($_GET["name"], $_GET["challenge"])) {
        session_register(S_ID);
        $_SESSION[S_ID]["user_id"] = $user_id;
        $_SESSION[S_ID]["ip_login"] =& $_SERVER["REMOTE_ADDR"];
        $_SESSION[S_ID]["time_login"] = time();
        //$_SESSION[S_ID]["menu_id"] = 0;
        $good = true;
        try {
            $sys_user = new System_User($db, $user_id);
            $sys_user->Login();
        } catch (Exception $e) {
            $msg = $e->getMessage();
            $good = false;
            session_destroy();
        }
        if ($good) {
Ejemplo n.º 9
0
?>
 value="D">DEBITS</option>
																</select></li>
											</ul>
										</div>
									</div>								
								</form>
                            </div>
							<?php 
if (isset($_POST['date1']) && isset($_POST['date2']) && isset($_POST['operation'])) {
    $date1 = $_POST['date1'];
    $date2 = $_POST['date2'];
    $operation = $_POST['operation'];
    Redirect('ili-modules/caisse/echeancier?date1=' . $date1 . '&date2=' . $date2 . '&operation=' . $operation);
}
Check($date1, $date2, $operation);
?>
						</div>
						<div class="space5"></div>
					</div>
					<!-- END EXAMPLE TABLE widget--> 
				</div>
			</div>
			<!-- END PAGE CONTENT--> 
		</div>
		<!-- END PAGE CONTAINER--> 
	</div>
	<!-- END PAGE --> 
</div>
<!-- END CONTAINER --> 
<!-- BEGIN FOOTER -->
Ejemplo n.º 10
0
function IAUTH_remove_API($api_id)
{
    Check($api_id, 'uid');
    SQL("DELETE FROM api_info WHERE api_id={$api_id}");
    accessLog('API(remove) ' . $api_id);
    return true;
}
Ejemplo n.º 11
0
function GetAppInfo($appid, $pTmp)
{
    static $appInfo = array();
    if ($appid == 'WSC') {
        foreach ($appInfo as $id => $info) {
            if ($info['app_type'] == 'WSC') {
                return $id;
            }
        }
        return '================';
    }
    Check($appid, 'appid');
    if (empty($appInfo[$appid])) {
        $sql = mysql_fetch_assoc(SQL("SELECT * FROM app_info WHERE app_id='{$appid}'"));
        if (!$sql) {
            throw new IAuthException('app not exist', $appid);
        }
        $appInfo[$appid] = $sql;
    }
    if ($appInfo[$appid]['status'] == 'disable') {
        throw new IAuthException('app is disabled', $appid);
    }
    if (array_key_exists($pTmp, $appInfo[$appid])) {
        return $appInfo[$appid][$pTmp];
    } else {
        throw new IAuthException('FATAL!! key not exist');
    }
}
Ejemplo n.º 12
0
    print Select('LegTo_' . $i, $aDirection, '', '');
    ?>
 ; <?php 
    print Select('LegDiagramDirection_' . $i, $aDiagramDirection, '', '');
    ?>
 )</td>
                    <td><?php 
    print Select('ArmLR_' . $i, $aLR, '', '');
    print Select('ArmSection_' . $i, $aSectionArm, '', '');
    ?>
 <strong><?php 
    print Select('ArmTechniqueID_' . $i, $oTechniquesArm, 'ID', 'Name');
    ?>
</strong><br/><?php 
    print Select('ToolArm_' . $i, $aToolArm, '', '');
    print Check('ArmToolIsTwin_' . $i);
    ?>
 ( <?php 
    print Select('ArmTo_' . $i, $aDirection, '', '');
    ?>
 ; <?php 
    print Select('ArmDiagramDirection_' . $i, $aDiagramDirection, '', '');
    ?>
 )</td>
                    <td class="facing"><?php 
    print Select('Facing_' . $i, $aFacing, '', '');
    ?>
</td>
                </tr>
            </tbody>
			<?php