コード例 #1
0
function showSuccessVisa(Visa $payment)
{
    $payment->showSuccess();
}
コード例 #2
0
ファイル: User.php プロジェクト: Kilix/php-abac
 /**
  * @param \PhpAbac\Example\Visa $visa
  * @return \PhpAbac\Example\User
  */
 public function removeVisa(Visa $visa)
 {
     if (isset($this->visas[$visa->getId()])) {
         unset($this->visas[$visa->getId()]);
     }
     return $this;
 }
コード例 #3
0
ファイル: addPlayer.php プロジェクト: kunal-bajpai/gfa
$villages = Village::find_all();
$teams = Team::find_all();
if (sizeof($_POST) > 0) {
    $player = new Player();
    $player->get_values();
    $player->dob = strtotime($player->dob);
    $player->save();
    if ($player->category == 1) {
        $contract = new Contract();
        $contract->set($player->id, $_POST['team'], strtotime($_POST['contFrom']), strtotime($_POST['contTo']));
        $contract->save();
        $ins = new Insurance();
        $ins->set($player->id, strtotime($_POST['insTo']));
        $ins->save();
        if ($_POST['visaTo'] != '') {
            $visa = new Visa();
            $visa->set($player->id, strtotime($_POST['visaTo']));
            $visa->save();
        }
    }
    $files = File::get_files();
    if ($files[0] != NULL) {
        $files[0]->name = "Player" . $player->id;
        $files[0]->save_file_in(UPLOAD_DIR . "images/photos/");
    }
}
?>
<html>
	<head>
		<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
		<script type="text/javascript" src="js/jsDatePick.min.1.3.js"></script>
コード例 #4
0
ファイル: playerView.php プロジェクト: kunal-bajpai/gfa
     $newCont->set($_GET['id'], $_POST['team'], strtotime($_POST['contFrom']), strtotime($_POST['contTo']));
     $newCont->save();
 }
 if (isset($_POST['loanFrom']) && isset($_POST['loanTo'])) {
     $contractTeam = $player->find_contract_team();
     $newLoan = new Loan();
     $newLoan->set($_GET['id'], $contractTeam->id, $_POST['toteam'], strtotime($_POST['loanFrom']), strtotime($_POST['loanTo']));
     $newLoan->save();
 }
 if (isset($_POST['insTo'])) {
     $newIns = new Insurance();
     $newIns->set($_GET['id'], strtotime($_POST['insTo']));
     $newIns->save();
 }
 if (isset($_POST['visaTo'])) {
     $newVisa = new Visa();
     $newVisa->set($_GET['id'], strtotime($_POST['visaTo']));
     $newVisa->save();
 }
 if (isset($_POST['transFrom'])) {
     $newTrans = new Transfer();
     $newTrans->set($_GET['id'], $_POST['assoc'], strtotime($_POST['transFrom']));
     $newTrans->save();
 }
 $teams = Team::find_all();
 $assocs = Assoc::find_all();
 if ($player->category == 1) {
     $contracts = Contract::find_by_sql("SELECT * FROM contracts WHERE player={$player->id} ORDER BY date_of_reg ASC");
     $insurances = Insurance::find_by_sql("SELECT * FROM insurances WHERE player={$player->id} ORDER BY added_on ASC");
     $visas = Visa::find_by_sql("SELECT * FROM visas WHERE player={$player->id} ORDER BY added_on ASC");
     $loans = Loan::find_by_sql("SELECT * FROM loans WHERE player={$player->id} ORDER BY start ASC");
コード例 #5
0
ファイル: ajax.visa.php プロジェクト: lz1988/stourwebcms
require_once SLINEDATA . "/webinfo.php";
//获取国家信息
if ($dopost == 'getCountry') {
    $keyword = Visa::js_unescape($keyword);
    $rule = "/^[a-zA-Z]+\$/i";
    if (!preg_match($rule, $keyword)) {
        $sql = "select kindname from sline_visa_area where isopen='1' and kindname like '%{$keyword}%' limit 0,10";
        $res = $dsql->getAll($sql);
        $str = '';
        foreach ($res as $row) {
            $row['kindname'] = str_replace($keyword, '<b>' . $keyword . '</b>', $row['kindname']);
            $str .= $row['kindname'] . ',';
        }
        $str = substr($str, 0, strlen($str) - 1);
    } else {
        $str = Visa::matchPinyin($keyword);
    }
    echo $str;
}
//获取国家拼音
if ($dopost == 'getPinyin') {
    $sql = "select pinyin from sline_visa_area where kindname='{$countryname}'";
    $row = $dsql->GetOne($sql);
    echo $row['pinyin'] ? $row['pinyin'] : '';
}
class Visa
{
    public static function matchPinyin($keyword)
    {
        global $dsql;
        $sql = "select kindname as matchname from sline_visa_area where isopen=1";