예제 #1
0
 /**
  * 取得した休日のsort_orderを判定
  *
  * @param
  */
 function getWeekNum($date)
 {
     //         $sql = 'select week_num from m_term where start_date <= :date and :date <= end_date';
     //         $searchParam['date'] = $date;
     //         // データベースに接続する
     //         $conn = DbControl::getInstance();
     //         $conn->dbConnect(DbControl::SLAVE_DB);
     //         // クエリを実行する
     //         $res = $conn->dbExecFetch(DbControl::SLAVE_DB, $sql, $searchParam);
     //         if($_SESSION[SESSION_USER_ID] == 4) {
     //指定した日付の年間週番号
     $wnum = 1;
     $year = getYear($date);
     $month = getMonth($date);
     $day = 01;
     $preg = '%04d%02d%02d';
     $this_d = sprintf($preg, $year, $month, $day);
     $start_w = $this->getDayNum($this_d);
     if ($start_w == 0) {
         $start_w = 7;
     }
     $date_d = substr($date, 6, 2);
     for ($i = 1; $i <= $date_d; $i++) {
         if ($start_w == 7) {
             $start_w = 1;
             if ($i != 1) {
                 $wnum++;
             }
         } else {
             $start_w++;
         }
     }
     return $wnum;
 }
예제 #2
0
</div>
		<div id="footer">
			<?php 
function getYear()
{
    $theday = getdate();
    $y = $theday[year];
    return $y;
}
?>

<p><a target="_blank" href="http://www.glit.edu"><img width="107" height="41" border="0" align="middle" alt="Visit the Great Lakes Institute of Technology Website" src="http://www.erieit.edu/_files/images/glit_logo.png" /></a><a href="http://www.youtube.com/thecareerschools" target="_blank"><img width="80" height="41" border="0" align="middle" src="http://www.erieit.edu/_files/images/file_120.png" alt="See EIT videos on YouTube.com/thecareerschools" /></a>&nbsp;&nbsp; <a href="http://www.facebook.com"><img width="100" height="38" border="0" align="middle" src="http://www.erieit.edu/_files/images/file_118.png" alt="Become a friend of EIT
on Facebook:  thecareerschools" /></a>&nbsp;&nbsp; <a href="http://www.twitter.com/EITCareerServ" target="_blank"><img width="100" height="23" border="0" align="middle" src="http://www.erieit.edu/_files/images/file_108.png" alt="Follow EIT Career Services Office on Twitter:  EITCareerServ" /></a><br />
Home |&nbsp;<a href="http://www.erieit.edu/alumni/">Career Services (Alumni &amp; Employers)</a>&nbsp;|&nbsp;<a href="http://www.erieit.edu/careers/">Employment</a> | <a href="http://www.erieit.edu/contact/">Contact Us</a> | <a href="http://www.erieit.edu/site map/">Site Map</a> | <a href="http://www.erieit.edu/privacy/">Privacy Policy</a> | <a href="mailto:info@erieit.edu">Webmaster</a> | <a href="http://www.glit.edu">glit.edu</a>  | <a href="http://toniguy.com/academy/erie/default.aspx">toniguy.com</a> <br />
&copy; <? echo getYear(); ?>Erie Institute of Technology, All Rights Reserved</p>
<br />
		</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2137940-3");
pageTracker._initData();
pageTracker._trackPageview();


</script>
	</body>
</html>
예제 #3
0
파일: config.php 프로젝트: nextinfos/htdocs
function getTerm()
{
    $date = date('Y-m-d');
    // 		$date=date('Y-m-d', strtotime("10/10/".getYear()));	//--(m/d/Y)
    $term1Begin = date('Y-m-d', strtotime("05/18/" . getYear()));
    // 		$term1End = date('Y-m-d', strtotime("10/10/".getYear()));
    $term1End = date('Y-m-d', strtotime("10/31/" . getYear()));
    // 		$term2Begin = date('m-d', strtotime("11/02"));
    $term2Begin = date('Y-m-d', strtotime("11/01/" . getYear()));
    $term2End = date('Y-m-d', strtotime("03/25" . getYear() . " +1 year"));
    if ($date >= $term1Begin && $date <= $term1End) {
        $term = 1;
    } elseif ($date >= $term2Begin && $date <= $term2End) {
        $term = 2;
    } else {
        $term = 3;
    }
    return $term;
}
 function unibo()
 {
     $this->location = "div1_div3_div2";
     //titolo
     parent::XPathFilter("//div[@id=\"articleTitle\"]/h3");
     $this->title = parent::toString("txt");
     $this->title = trim($this->title);
     $this->locations["title"] = "_div3_div2_h31";
     $this->start_array["title"] = 0;
     $this->end_array["title"] = mb_strlen($this->title, "UTF-8");
     //anno pubblicazione
     parent::XPathFilter("//div[@id=\"breadcrumb\"]//a[@target=\"_parent\"][2]");
     $this->year = parent::toString("txt");
     $arr = explode(" ", $this->year);
     $arr2 = explode("(", $this->year);
     $this->year = $arr[count($arr) - 1];
     $this->year = substr($this->year, 1, 4);
     $this->locations["year"] = "_div2_a2";
     $start = mb_strlen($arr2[0], "UTF-8") + 1;
     $this->start_array["year"] = $start;
     $this->end_array["year"] = $start + mb_strlen($this->year, "UTF-8");
     //autori
     parent::XPathFilter("//div[@id=\"authorString\"]/em");
     $autore = parent::toString("txt");
     $this->authors = explode(", ", $autore);
     if (strcmp($this->authors[0], "") == 0) {
         //dato che l'explode di una stringa vuota da come risultato un array di un elemento con chiave 0 e valore stringa vuota è necessario questo controllo
         $this->authors = null;
     } else {
         $this->locations["authors"] = "_div3_div3_em1";
         $start = 0;
         $end = 0;
         foreach ($this->authors as $key => $val) {
             $this->authors[$key] = trim($val);
             $val = $this->authors[$key];
             if ($key == 0) {
                 $start = 0;
                 $end = mb_strlen($val, "UTF-8");
                 $this->start_array[$key] = $start;
                 $this->end_array[$key] = $end;
             } else {
                 $start = $end + 2;
                 $end = $start + mb_strlen($val, "UTF-8");
                 $this->start_array[$key] = $start;
                 $this->end_array[$key] = $end;
             }
         }
         //inutili per unibo, ma servono per dare uniformità con dlib
         $this->locations["firstauthors"] = "";
         $this->locations["continuation_of_authors"] = "";
     }
     //doi
     parent::XPathFilter("//a[@id=\"pub-id::doi\"]");
     $this->doi = parent::toString("txt");
     $this->doi = trim($this->doi);
     $this->locations["doi"] = "_div3_a1";
     $this->start_array["doi"] = 0;
     $this->end_array["doi"] = mb_strlen($this->doi, "UTF-8");
     //abstract
     parent::XPathFilter("//div[@id=\"articleAbstract\"]//div");
     $this->abstract = parent::toString("txt");
     $this->abstract = trim($this->abstract);
     $tmp = parent::toString();
     //prendo il nodo con ancora i tag html per controllare se il contenuto dell' abstract direttamente nel div o in un p dentro al div
     $tmp = substr($tmp, 5, 3);
     $this->locations["abstract"] = "_div3_div4_div1";
     if (strpos($tmp, "<p") !== FALSE) {
         $this->locations["abstract"] .= "_p1";
     }
     $this->start_array["abstract"] = 0;
     $this->end_array["abstract"] = mb_strlen($this->abstract, "UTF-8");
     //su unibo le intro sono al più dentro i documenti pdf, quindi non è richiesto che lo scraper le sappia prendere
     //citazioni
     $set = null;
     parent::XPathFilter("//body//div[@id=\"articleCitations\"]/div[1]//p");
     $set = $this->nodes->each(function ($node) {
         return $node->text();
     });
     $citazione = null;
     foreach ($set as $nann => $v) {
         $title = null;
         $year = null;
         $doi = null;
         $url = null;
         $authors = array();
         $tmp = 0;
         //target
         $pos = $nann + 1;
         $this->locations["citos"][$nann] = "_div3_div7_div1_p{$pos}";
         $this->start_array["citos"][$nann] = 0;
         $this->end_array["citos"][$nann] = $this->start_array["citos"][$nann] + mb_strlen(trim($v), "UTF-8");
         //autori
         $authors = getAuthorsUnibo($v);
         //anno della citazione
         $year = getYear($v, $this->year);
         //titolo
         $title = getTitleUnibo($v, $year, $authors);
         //doi e url della citazione
         $coppia = getDoiAndURL($v);
         if (isset($coppia[0])) {
             $url = $coppia[0];
         }
         if (isset($coppia[1])) {
             $doi = $coppia[1];
         }
         $this->citations[$nann] = new citationcontainer($v, $title, $year, $authors, $doi, $url);
         /*echo "<br><br> Annotazione $nann:<br>";
         		
         		echo "Titolo trovato: $title<br>";
         		echo "Anno trovato: $year<br>";
         		echo "Url trovato: $url<br>";
         		echo "Doi trovato: $doi<br>";
         		echo "Lista autori:<br>";
         		foreach ($authors as $k=>$val){
         			echo "Autore $k: $val<br>";
         		}
         		echo "Target:<br>";
         		echo "location: ".$this->location.$this->locations["citos"][$nann]."<br>";
         		echo "start: ".$this->start_array["citos"][$nann]."<br>";
         		echo "end: ".$this->end_array["citos"][$nann]."<br>";
         		echo "<br>";
         		*/
     }
 }
예제 #5
0
                    <ul>
                        <li><a href="#sitemap" class="active">sitemap</a></li>
                        <li><a href="#aboutDev">privacy</a></li>
                        <li><a href="#disclaimer">legal</a></li>
                        <li><a href="#contactUs">help</a></li>
                        <li><a href="#contactUs">about developer</a></li>
                    </ul>
                    <p>Copyright &copy; <?php 
display(getYear());
?>
 <a href="<?php 
display(base_url());
?>
">ingnepal.org</a>. All Rights Reserved.</p>
                    <div class="clearfix"></div>
예제 #6
0
function dayDiff($timestamp1, $timestamp2)
{
    $dayInYear1 = getDayOfYear($timestamp1);
    $dayInYear2 = getDayOfYear($timestamp2);
    return getYear($dayInYear1) * 365 + $dayInYear1 - (getYear($dayInYear2) * 365 + $dayInYear2);
}
function draw_page($persistent)
{
    ?>
<h1>ברוכים הבאים - אנא מלאו את הפרטים הבאים על מנת להצטרף למערכת</h1>
<form name="registation" method="POST">
<table>
	<tr>
		<td>*שם פרטי:</td>
		<td>
			<input type="text" name="first_name" title="הכנס שם פרטי" value="<?php 
    print_r($persistent["first_name"]);
    ?>
">
		</td>
	</tr>
	<tr>
		<td>*שם משפחה:</td>
		<td>
			<input type="text" name="last_name" title="הכנס שם משפחה"value="<?php 
    print_r($persistent["last_name"]);
    ?>
">
		</td>
	</tr>
		
	<tr>		
		<td>*שם משתמש:</td>
		<td>
			<input type="text" name="user_name" title="הכנס שם משתמש באותיות לועזיות" value="<?php 
    print_r($persistent["user_name"]);
    ?>
">
		</td>
	</tr>
	
	<tr>
		<td>*סיסמא:</td>
		<td>
			<input type="password" name="pass1"  title="הכנס סיסמה סודית" value=<?php 
    print_r($persistent["pass1"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>*אימות סיסמא:</td>
		<td>
			<input type="password" name="pass2"  title="הכנס סיסמה סודית" value=<?php 
    print_r($persistent["pass1"]);
    ?>
>
		</td>
	</tr>
 	<tr>
		<td>בית ספר:</td>
		<td>
			<select name="memberOfGroup"> 
				<?php 
    getGroupsList();
    ?>
			</select>
		</td>
	</tr> 
	<tr>
		<td>מספר זהות:</td>
		<td>
			<input type="text" name="ID" title="הכנס מספר זהות בן 9 ספרות" value="<?php 
    print_r($persistent["ID"]);
    ?>
">
		</td>
	</tr>
	
	<tr>
		<td>כתובת דוא"ל:</td>
		<td>
			<input type="text" name="email" title="הכנס כתובת דואר אלקטרוני" value=<?php 
    print_r($persistent["email"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>תאריך לידה:</td>
		<td>   
			<select name="year_of_birth" >
			<?php 
    getYear();
    ?>
			</select>
		
		    
			<select name="month_of_birth" >
			<?php 
    getMonth();
    ?>
			</select>
		
		    
			<select name="day_of_birth" >
			<?php 
    getDay();
    ?>
			</select>
		</td>
	</tr>
	
	<tr>
		<td>טלפון:</td>
		<td>
			<input type="text" name="phone" title="הכנס מספר טלפון "value=<?php 
    print_r($persistent["phone"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>טלפון סלולרי:</td>
		<td>
			<input type="text" name="cell_phone" title="הכנס מספר טלפון סלולרי" value=<?php 
    print_r($persistent["cell_phone"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>ישוב:</td>
		<td>
			<input type="text" name="city" title="הכנס את שם הישוב בו אתה גר" value=<?php 
    print_r($persistent["city"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>רחוב:</td>
		<td>
			<input type="text" name="street" title="הכנס את שם הרחוב בו אתה גר" value=<?php 
    print_r($persistent["street"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>מספר בית:</td>
		<td>
			<input type="text" name="house_number" title="הכנס את מספר הבית בו אתה גר" value=<?php 
    print_r($persistent["house_number"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>שם האב:</td>
		<td>
			<input type="text" name="father_name" title="הכנס את שם האב" value="<?php 
    print_r($persistent["father_name"]);
    ?>
">
		</td>
	</tr>
	<tr>
		<td> טלפון של האב:</td>
		<td>
			<input type="text" name="father_phone" title="הכנס מספר טלפון של האב" value=<?php 
    print_r($persistent["father_phone"]);
    ?>
>
		</td>
	</tr>
	<tr>
		<td>שם האם:</td>
		<td>
			<input type="text" name="mother_name" title="הכנס את שם האם" value="<?php 
    print_r($persistent["mother_name"]);
    ?>
">
		</td>
	</tr>
	<tr>
		<td>טלפון של האם:</td>
		<td>
			<input type="text" name="mother_phone" title="הכנס מספר טלפון של האם" value=<?php 
    print_r($persistent["mother_phone"]);
    ?>
>
		</td>
	</tr>


</table>
<input type="submit" title="לחץ להרשמה" value="הירשם"></form>

<?php 
}
예제 #8
0
 public function getDate()
 {
     return getYear($this->datestamp);
 }
예제 #9
0
 if (isset($request['name'])) {
     $param['name'] = $request['name'];
 }
 if (isset($request['staff_cd'])) {
     $param['staff_cd'] = $request['staff_cd'];
 }
 $termid = false;
 if (isset($request['submit'])) {
     $button = key($request['submit']);
     if (isset($request['weekDays'][$button])) {
         $titleDay = $request['weekDays'][$button];
         //TOPからの遷移
         //             $year = 2014;
         //             $titleDay = 0101;
         $date = changeYYMMDD($year, $titleDay);
         $year = getYear($date);
         $month = getMonth($date);
         $day = getDayYmd($date);
         $termid = getTermId($date);
         $param['target_date'] = $date;
         $param['titleDay'] = $titleDay . '(' . $day . ')';
     }
     if (isset($request['title'][$button])) {
         $param['title'] = $request['title'][$button];
     }
     if (isset($request['comment'][$button])) {
         $param['comment'] = $request['comment'][$button];
     }
     if (isset($request['sort_order'][$button])) {
         $param['sort_order'] = $request['sort_order'][$button];
     }
예제 #10
0
파일: search.php 프로젝트: te-koyama/sheep
function makeDispArray(&$dispArray, $tmpArray, $arrayPeriod, $targetMonth, $targetYear, $breakid, $breakname, $breakcd, $breakmail, $name)
{
    if (empty($tmpArray) || count($tmpArray) == 0) {
        return 0;
    }
    $makeArray = array();
    $makeName = array();
    foreach ($name as $key => $val) {
        foreach ($val as $key_1 => $val_1) {
            if (empty($makeName[$key])) {
                $makeName[$key] = "";
            }
            $makeName[$key] .= ' / ' . $val_1;
        }
    }
    // 対象の責任者月のみ初期配列を作成
    foreach ($arrayPeriod as $key => $val) {
        // 月指定検索の場合、該当月分のみ初期配列を作成する
        if (!empty($targetMonth) && isset($targetMonth) && $targetMonth != $val) {
            continue;
        }
        $makeArray[$breakid][$targetYear][$val]["staff_cd"] = $breakcd;
        $makeArray[$breakid][$targetYear][$val]["name"] = $breakname;
        //$makeArray[$breakid][$targetYear][$val]["mail"] = ""; //DEL R. Kumabe 20150710
        $makeArray[$breakid][$targetYear][$val]["mail"] = $breakmail;
        //ADD R. Kumabe 20150710
        $makeArray[$breakid][$targetYear][$val]["retire_flg"] = "";
        $makeArray[$breakid][$targetYear][$val]["target_date"] = "";
        $makeArray[$breakid][$targetYear][$val]["hearing_id"] = "";
        $makeArray[$breakid][$targetYear][$val]["EmpName"] = $makeName[$val];
    }
    foreach ($tmpArray as $key => $val) {
        if (empty($val["hearing_id"]) || is_null($val["hearing_id"])) {
            $start_month = "";
            $end_month = "";
            // 責任者として関連が有るが、ヒアリングシートがまだ作成されていない場合
            $start_month = (int) substr($val['start_date'], 4, 2);
            $end_month = (int) substr($val['end_date'], 4, 2);
            // $val['end_date']に月末を含んでいなければ$end_monthを-1する(月末まで担当している場合にヒアリングシートを記入するため)
            $year_of_end_date = getYear($val['end_date']);
            $month_of_end_date = getMonth($val['end_date']);
            $end_of_end_date = getYYYYMMDD($year_of_end_date, $month_of_end_date, "end_of_month");
            if ($val['end_date'] < $end_of_end_date) {
                $end_month = $end_month - 1;
            }
            for ($i = $start_month; $i <= $end_month; $i++) {
                // 月指定検索の場合、該当月分のみ初期配列を作成する
                if (!empty($targetMonth) && isset($targetMonth) && $targetMonth != $i) {
                    continue;
                }
                $makeArray[$breakid][$targetYear][$i]["staff_cd"] = $val["staff_cd"];
                $makeArray[$breakid][$targetYear][$i]["name"] = $val["name"];
                $makeArray[$breakid][$targetYear][$i]["mail"] = $val["mail"];
                $makeArray[$breakid][$targetYear][$i]["retire_flg"] = $val["retire_flg"];
                $makeArray[$breakid][$targetYear][$i]["target_date"] = getYYYYMMDD($targetYear, $i, "target_date");
                $makeArray[$breakid][$targetYear][$i]["hearing_id"] = $val["hearing_id"];
                //                  $makeArray[$breakid][$targetYear][$i]["EmpName"] .= ', ' . $val["new_emp_name"];
            }
        } else {
            $makeArray[$breakid][$targetYear][$val['target_month']]["staff_cd"] = $val["staff_cd"];
            $makeArray[$breakid][$targetYear][$val['target_month']]["name"] = $val["name"];
            $makeArray[$breakid][$targetYear][$val['target_month']]["mail"] = $val["mail"];
            $makeArray[$breakid][$targetYear][$val['target_month']]["retire_flg"] = $val["retire_flg"];
            $makeArray[$breakid][$targetYear][$val['target_month']]["target_date"] = getYYYYMMDD($targetYear, $val['target_month'], "target_date");
            $makeArray[$breakid][$targetYear][$val['target_month']]["hearing_id"] = $val["hearing_id"];
            // 現在設定されている期間外でのヒアリングシートが存在すると、初期化で未作成の為に
            // noticeが出る事有るので存在チェックを行う  文字列結合しようとしている為初期化されていないと
            // noticeが出る
            if (empty($makeArray[$breakid][$targetYear][$val['target_month']]["EmpName"])) {
                $makeArray[$breakid][$targetYear][$val['target_month']]["EmpName"] = "";
            }
            //             $makeArray[$breakid][$targetYear][$val['target_month']]["EmpName"] .= ', ' . $val["new_emp_name"];
        }
    }
    //var_dump ($tmpArray);
    $work = array();
    foreach ($makeArray as $key => $val) {
        foreach ($val as $key_1 => $val_1) {
            foreach ($val_1 as $key_2 => $val_2) {
                $work["id"] = $key;
                $work["staff_cd"] = $val_2["staff_cd"];
                $work["targetYear"] = $key_1;
                $work["targetMonth"] = $key_2;
                $work["name"] = $val_2["name"];
                $work["mail"] = $val_2["mail"];
                $work["retire_flg"] = $val_2["retire_flg"];
                $work["target_date"] = $val_2["target_date"];
                $work["hearing_id"] = $val_2["hearing_id"];
                $work["EmpName"] = ltrim($val_2["EmpName"], " / ");
                array_push($dispArray, $work);
            }
        }
    }
}
예제 #11
0
<?php

$scoreID = $_REQUEST['scoreID'];
$score = json_decode($_REQUEST['score']);
$studentID = json_decode($_REQUEST['studentID']);
$scoreType = $_REQUEST['scoreType'];
$subjectID = $_REQUEST['subjectID'];
$result['sizeOf'] = sizeof($score);
for ($i = 0; $i < sizeof($score); $i++) {
    $result['data'][$studentID[$i]] = $score[$i];
    if ($score[$i] != '') {
        if ($scoreType == 'GRADE') {
            if (!gradeSet($subjectID, getTerm(), getYear(), $studentID[$i], $score[$i])) {
                $result['error'][$studentID[$i]] = TRUE;
            }
        } else {
            if (!scoreSet($scoreID, $studentID[$i], $score[$i])) {
                $result['error'][$studentID[$i]] = TRUE;
            }
        }
    }
}
echo json_encode($result);
예제 #12
0
} elseif ($report == "score") {
    $strSQL = sprintf("\n    SELECT\n      regstu.subjectID,sub.name,regstu.grade\n    FROM\n      `register-student` regstu,\n      `subject` sub\n    WHERE\n      regstu.subjectID = sub.subjectID AND\n      regstu.studentID = '%s' AND\n      regstu.registerID =\n      (\n        SELECT\n          registerID\n        FROM\n          `registerinfo`\n        WHERE\n          `term` = '%s' AND\n          `year` = '%s'\n      )\n    ", mysql_real_escape_string($studentID), mysql_real_escape_string(getTerm()), mysql_real_escape_string(getYear()));
    $objQuery = mysql_query($strSQL);
    if ($objQuery && mysql_num_rows($objQuery) > 0) {
        while ($row = mysql_fetch_array($objQuery)) {
            $preData['grade'] = $row['grade'] != '' ? $row['grade'] : '--';
            $preData['subjectID'] = $row['subjectID'];
            $preData['subjectName'] = $row['name'];
            $strSQL = sprintf("\n          SELECT\n            scoreID,maxScore\n          FROM\n            `scoreinfo`\n          WHERE\n            subjectID = '%s' AND\n            registerID =\n            (\n              SELECT\n                registerID\n              FROM\n                `registerinfo`\n              WHERE\n                `term` = '%s' AND\n                `year` = '%s'\n            )\n          ", mysql_real_escape_string($row['subjectID']), mysql_real_escape_string(getTerm()), mysql_real_escape_string(getYear()));
            $objQuery2 = mysql_query($strSQL);
            if ($objQuery2 && mysql_num_rows($objQuery2) > 0) {
                $maxScore = 0;
                $sumScore = 0;
                while ($row2 = mysql_fetch_array($objQuery2)) {
                    $maxScore += $row2['maxScore'];
                    $strSQL = sprintf("\n                SELECT\n                  score\n                FROM\n                  `studentscore`\n                WHERE\n                  scoreID = '%s' AND\n                  subjectID = '%s' AND\n                  studentID = '%s' AND\n                  registerID =\n                  (\n                    SELECT\n                      registerID\n                    FROM\n                      `registerinfo`\n                    WHERE\n                      `term` = '%s' AND\n                      `year` = '%s'\n                  )\n                ", mysql_real_escape_string($row2['scoreID']), mysql_real_escape_string($row['subjectID']), mysql_real_escape_string($studentID), mysql_real_escape_string(getTerm()), mysql_real_escape_string(getYear()));
                    $objQuery3 = mysql_query($strSQL);
                    if ($objQuery3 && mysql_num_rows($objQuery3) > 0) {
                        while ($row3 = mysql_fetch_array($objQuery3)) {
                            $sumScore += $row3['score'];
                        }
                    }
                }
                if ($confUserType == 'instructor') {
                    $preData['score'] = $sumScore . '/' . $maxScore;
                }
                $data['data'][] = $preData;
            } else {
                $preData['score'] = '--';
                $data['data'][] = $preData;
            }
예제 #13
0
 //Fehler wegen ->undefinded property stdclass->trackname
 $posdir = strpos($itunes[$i]->artistName, getDirector($row));
 //echo $posdir;
 if (getDirector($row) === $itunes[$i]->artistName && $row[5] === $itunes[$i]->trackName) {
     $rows = $i;
     $available = 1;
     echo "1";
     break;
 }
 if (getDirector($row) === $itunes[$i]->artistName) {
     $rows = $i;
     $available = 1;
     echo "2";
     break;
 }
 if ($posdir !== -1 && $pos !== -1 && $itunesyear === getYear($row) && getDirector($row) === $itunes[$i]->artistName) {
     $rows = $i;
     $available = 1;
     echo "3";
     break;
 }
 //            if ($pos !== false) {
 //                $row = $i;
 //                $available = 1;
 //                echo "4";
 //                break;
 //            }
 //            if ($itunesyear === $year) {
 //                $rows = $i;
 //                $available = 1;
 //                //echo "4";
예제 #14
0
파일: main.php 프로젝트: phn007/MyTools
function copyrightLink($footer)
{
    ?>
	<a href="<?php 
    echo HOME_URL;
    ?>
">©<?php 
    echo getYear();
    ?>
 <?php 
    echo getDomain();
    ?>
 – All Rights Reserved</a>
<?php 
}
예제 #15
0
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
$task = '';
if (isset($_POST['action'])) {
    $task = $_POST['action'];
} else {
    if (isset($_GET['action'])) {
        $task = $_GET['action'];
    }
}
switch ($task) {
    case 'getCountryName':
        getCountryName($conn);
        break;
    case 'getYear':
        getYear($conn);
        break;
    case "getMonthList":
        getMonthList($conn);
        break;
    case 'getItemGroup':
        getItemGroup($conn);
        break;
    case 'getItemList':
        getItemList($conn);
        break;
    case 'getShipmentStatus':
        getShipmentStatus($conn);
        break;
    case "getFundingSource":
        getFundingSource($conn);
예제 #16
0
파일: home.php 프로젝트: biow0lf/evedev-kb
 /**
  *
  * @param integer $month
  * @param integer $year
  */
 function setMonth($month, $year)
 {
     $month = (int) $month;
     $year = (int) $year;
     if ($month < 1 || $month > 12 || $year < 2000) {
         $month = kbdate('m');
         $year = getYear();
     }
     $this->month = $month;
     if ($this->month < 10) {
         $this->month = '0' . $this->month;
     }
     $this->year = $year;
     if ($month == 1) {
         $pyear = $year - 1;
         $pmonth = 12;
     } else {
         $pyear = $year;
         $pmonth = $month - 1;
     }
     if ($this->month == 12) {
         $nmonth = 1;
         $nyear = $this->year + 1;
     } else {
         $nmonth = $this->month + 1;
         $nyear = $this->year;
     }
     $this->periodName = 'Month';
     $this->period = date('F, Y', mktime(0, 0, 0, $this->month, 1, $this->year));
     $this->currentTime = $this->month == kbdate('m') && $this->year == kbdate('Y');
     if (!config::get('show_monthly')) {
         $this->pargs[] = array('period', 'month', true);
         $this->nargs[] = array('period', 'month', true);
         $this->cargs[] = array('period', 'month', true);
     }
     $this->pargs[] = array('y', $pyear, true);
     $this->pargs[] = array('m', $pmonth, true);
     $this->nargs[] = array('y', $nyear, true);
     $this->nargs[] = array('m', $nmonth, true);
     $this->cargs[] = array('y', $this->year, true);
     $this->cargs[] = array('m', $this->month, true);
 }
예제 #17
0
    }
    $return['subjectID'] = $subjectID;
} elseif ($tag == 'preview') {
    $max = $_REQUEST['max'];
    if ($subjectID && $max) {
        $max = json_decode($max);
        $maxPass = true;
        for ($i = 0; $i < sizeof($max); $i++) {
            if ($max[$i] == '' || $max[$i] == null || !isset($max[$i])) {
                $maxPass = false;
                break;
            }
        }
        if ($maxPass) {
            $maxScore = $max[7];
            $strSQL = sprintf("\n            SELECT\n              stu.studentID,stu.firstName,stu.lastName,SUM(stusco.score) AS score\n            FROM\n              `studentscore` stusco RIGHT JOIN `student` stu ON stusco.studentID = stu.studentID\n            WHERE\n              stusco.scoreID IN\n              (\n              SELECT\n                scoreID\n              FROM\n                scoreinfo\n              WHERE\n                subjectID = '%s' AND\n                registerID =\n                (\n                  SELECT\n                    registerID\n                  FROM\n                    registerinfo\n                  WHERE\n                    term = '%s' AND\n                    year = '%s'\n                )\n              ) OR (stu.studentID IN (\n                SELECT\n                  studentID\n                FROM\n                  `register-student` regstu\n                WHERE\n                  regstu.subjectID = '%s' AND\n                  regstu.registerID =\n                  (\n                    SELECT\n                      registerID\n                    FROM\n                      registerinfo\n                    WHERE\n                      term = '%s' AND\n                      year = '%s'\n                  )\n              ) AND stusco.subjectID IS NULL\n            )\n            GROUP BY\n              studentID\n            ", mysql_real_escape_string($subjectID), mysql_real_escape_string(getTerm()), mysql_real_escape_string(getYear()), mysql_real_escape_string($subjectID), mysql_real_escape_string(getTerm()), mysql_real_escape_string(getYear()), mysql_real_escape_string($subjectID));
            $objQuery = mysql_query($strSQL);
            if ($objQuery && mysql_num_rows($objQuery)) {
                while ($row = mysql_fetch_assoc($objQuery)) {
                    $preData = $row;
                    if ($row['score'] == '') {
                        $preData['score'] = 0;
                    }
                    $grade = gradeCal(0, $max, 0, $row['score']);
                    $select = '<select name="grade" style="width: 80px;">';
                    // 							$select.= '<option value="">--</option>';
                    $select .= '<option value="' . $grade . '" selected>' . $grade . '</option>';
                    $select .= '<option value="W">W</option>';
                    $select .= '</select>';
                    $preData['grade'] = '<input type="hidden" name="studentID" value="' . $row['studentID'] . '">' . $select;
                    $preData['score'] = $preData['score'] . '/' . $maxScore;
예제 #18
0
    function getUserInfoHTML($edit = 0, $notAllowdToEdit = 0)
    {
        if ($edit) {
            $LineStart = "<input type=\"text\" name=\"";
            $LineMiddle = "\" value=\"";
            $LineEnd = "\"";
        } else {
            $LineStart = "";
            $LineMiddle = "";
            $LineEnd = "";
        }
        if (isset($_POST[add_user])) {
            $addUser = true;
            ?>
		<input type="hidden" name="addUser" value="addUser">
		<?php 
        }
        ?>
	 	
	 	<input type="hidden" name="newUserApproval" value="<?php 
        echo $this->uname;
        ?>
">
	 	<input type="hidden" name="getUserInfo" value="<?php 
        echo $this->uname;
        ?>
">
	 	<input type="hidden" name="uname" value="<?php 
        echo $this->uname;
        ?>
">  
	 	<!-- 
	 	
	 	-->
	 	<table>
	 		<tr>
	 			<td>שם פרטי	</td>
	 			<td><?php 
        //echo $this->firstName
        ?>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "firstName";
        }
        echo $LineMiddle . $this->firstName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם משפחה</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "lastName";
        }
        echo $LineMiddle . $this->lastName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם משתמש</td>
	 			<td>
	 				<?php 
        //echo $this->uname;
        ?>
	 				<?php 
        echo $LineStart;
        if ($addUser) {
            echo "uname";
        }
        echo $LineMiddle . $this->uname . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>תעודת זהות</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "id";
        }
        echo $LineMiddle . $this->id . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>בית ספר</td>
	 			<td>
	 			<?php 
        //From generalFunctions.php
        if ($edit && $edit != -1) {
            ?>
 
		 					<select name="memberOfGroup" >
									<?php 
            getGroupsList($this->memberOfGroup);
            ?>
 
							</select>
	 					<?php 
        } else {
            getUserGroup($this->uname, true);
            //Echo to screen
        }
        ?>
	 			
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>טלפון</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "phone";
        }
        echo $LineMiddle . $this->phone . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>טלפון נייד</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "cellPhone";
        }
        echo $LineMiddle . $this->cellPhone . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>דוא"ל</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "email";
        }
        echo $LineMiddle . $this->email . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td> תאריך לידה</td>
	 			<td>
	 				<?php 
        //echo $LineStart;
        if ($edit) {
            ?>
 
		 								<select name="year_of_birth" >
										<?php 
            getYear($this->BirthYear);
            ?>
										</select>
		
		    
										<select name="month_of_birth" >
										<?php 
            getMonth($this->birthMonth);
            ?>
										</select>
		
		    
										<select name="day_of_birth" >
										<?php 
            getDay($this->birthDay);
            ?>
										</select> <?php 
        } else {
            if (strcmp($this->BirthYear, "") != 0 && $this->BirthYear != 0) {
                echo $LineMiddle . $this->birthDay . "/" . $this->birthMonth . "/" . $this->BirthYear . $LineEnd;
            }
        }
        ?>
</td>
	 		</tr>
	 		<tr>
	 			<td>ישוב</td>
	 			<td>
		 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "city";
        }
        echo $LineMiddle . $this->city . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>רחוב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "street";
        }
        echo $LineMiddle . $this->Street . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מס' בית</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "houseNumber";
        }
        echo $LineMiddle . $this->houseNumber . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם האב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "fatherName";
        }
        echo $LineMiddle . $this->fatherName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מספר טלפון של האב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "fatherPhoneNumber";
        }
        echo $LineMiddle . $this->fatherPhoneNo . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם האם</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "motherName";
        }
        echo $LineMiddle . $this->motherName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מספר טלפון של האם</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "motherPhoneNumber";
        }
        echo $LineMiddle . $this->motherPhoneNo . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>הרשאות</td>
	 			
	 			<td>
	 				<?php 
        //From generalFunctions.php
        if ($edit == 1) {
            ?>
 
		 					<select name="permissionGroup" >
									<?php 
            getPermissionList($this->permission[PID]);
            ?>
							</select>
	 					<?php 
        } else {
            if (isset($this->permission[PGroupName])) {
                echo $this->permission[PGroupName];
            } else {
                echo "חניך";
            }
        }
        ?>
	 				<input type="hidden" name="approved" value="<?php 
        echo $this->approved();
        ?>
">
	 				</td>
	 		</tr> 			
	 		<?php 
        //			$this->birthDay="";
        //			$this->birthMonth="";
        //
        //			$this->city="";
        //			$this->Street="";
        //			$this->houseNumber="";
        //
        //			$this->memberOfGroup="";
        //			$this->permissionGroup="";
        //
        //			$this->approvedUser="";
        ?>
 
	 	</table>
	 	<table>
	 		<tr>
	 			<?php 
        if ($edit) {
            ?>
	 					<td>
	 						<input type="submit" name="userUpdateSave" value="שמור שינויים">
	 					</td>
	 					<td>
	 						<input type="submit" name="userUpdeateCancel" value="בטל שינויים">
	 					</td>
	 					<td>
	 						<input type="submit" name="resetPassword" value="איפוס סיסמא" title="איפוס הסיסמא ל1234">
	 					</td>
	 				<?php 
        } else {
            if (!$notAllowdToEdit) {
                ?>
<td><input type="submit" name="editUserData" value="ערוך"></td>
	 					<?php 
            }
        }
        ?>
	 		</tr>
	 	</table>
	 	<?php 
    }
예제 #19
0
파일: persons.php 프로젝트: roudai/wcadb
  
  	<!-- フォーム -->
  	<form class="form-inline" action="" method="get">
  		<!-- 年 -->
  		<div class="form-group">
  			<label><?php 
echo $Lyear[$lang];
?>
</label>
  			<SELECT class = "form-control" name = "year">
  				<OPTION value="0"><?php 
echo $Lall[$lang];
?>
</OPTION>
  				<?php 
getYear();
?>
  			</SELECT>
  		</div>
  		<!-- 地域 -->
  		<div class="form-group">
  			<label><?php 
echo $Lregion[$lang];
?>
</label>
  			<SELECT class = "form-control" name = "region">
  				<OPTION value = 'World'>World</OPTION>
  				<optgroup label="<?php 
echo $Lcontinents[$lang];
?>
">
예제 #20
0
 /**
  * formのバリデーションチェック(テスト)
  * エラーがあるとtrueを返す
  *
  * @param
  */
 function formValidate($form, $data)
 {
     $error = array();
     //検索画面関連
     if (!isset($data['search_staff_cd'])) {
         $error[] = "検索時の社員CDが取得できませんでした。";
     }
     if (!isset($data['search_name'])) {
         $error[] = "検索時の社員名が取得できませんでした。";
     }
     if (!isset($data['search_department_cd'])) {
         $error[] = "検索時の本部CDが取得できませんでした。";
     }
     if (!isset($data['search_division_cd'])) {
         $error[] = "検索時の部CDが取得できませんでした。";
     }
     if (!isset($data['search_section_cd'])) {
         $error[] = "検索時の課・支店CDが取得できませんでした。";
     }
     if (!isset($data['search_target_year'])) {
         $error[] = "検索時の対象年が取得できませんでした。";
     }
     //初期遷移のみ
     if ($form == "edit") {
         //社員IDを確認
         if (!isset($data['edit_id'])) {
             $error[] = "編集対象の社員IDが取得できませんでした。";
         } elseif (emp($data['edit_id']) || !preg_match("/^\\d{1,10}\$/", $data['edit_id'])) {
             $error[] = "編集対象のIDが不正です。";
         }
         //初期遷移以外
     } else {
         //社員IDを確認
         if (!isset($data['id'])) {
             $error[] = "社員IDが取得できませんでした。";
         } elseif (emp($data['id']) || !preg_match("/^\\d+\$/", $data['id'])) {
             $error[] = "IDが不正です。";
         }
         //社員CDを確認
         if (!isset($data['staff_cd'])) {
             $error[] = "社員CDが取得できませんでした。";
         } elseif (!emp($data['staff_cd']) && !preg_match("/^\\d+\$/", $data['staff_cd'])) {
             $error[] = "社員CDが不正です。";
         }
         //対象年度を確認
         if (!isset($data['target_year'])) {
             $error[] = "対象年度が取得できませんでした。";
         } elseif (!emp($data['target_year']) && !preg_match("/^\\d{4}\$/", $data['target_year'])) {
             $error[] = "対象年度が不正です。";
         }
         //社員名を確認
         if (!isset($data['name'])) {
             $error[] = "社員名が取得できませんでした。";
         }
         //社員名カナを確認
         if (!isset($data['name_kana'])) {
             $error[] = "社員名カナが取得できませんでした。";
         }
         //性別を確認
         if (!isset($data['sex'])) {
             $error[] = "性別が取得できませんでした。";
         }
         //メールアドレスを確認
         if (!isset($data['mail'])) {
             $error[] = "メールアドレスが取得できませんでした。";
         } elseif (!emp($data['mail']) && !preg_match('|^([\\w])+([\\w\\._-])*\\@([\\w])+([\\w\\._-])*\\.([a-zA-Z])+$|', $data['mail'])) {
             $errors[] = "メールアドレスが不正です。";
         }
         //本部CDを確認
         if (!isset($data['department_cd'])) {
             $error[] = "本部CDが取得できませんでした。";
         }
         //部CDを確認
         if (!isset($data['division_cd'])) {
             $error[] = "部CDが取得できませんでした。";
         }
         //課・支店CDを確認
         if (!isset($data['section_cd'])) {
             $error[] = "課・支店CDが取得できませんでした。";
         }
         //職種CDを確認
         if (!isset($data['occupation_cd'])) {
             $error[] = "職種CDが取得できませんでした。";
         }
         //職種名を確認
         if (!isset($data['occupation'])) {
             $error[] = "職種名が取得できませんでした。";
         }
         /*
                     //社員CDを確認
                     if ( !isset($data['staff_cd']) && emp($data['staff_cd'])){
                         $error[] = "社員CDが取得できませんでした。";
                     } elseif( !preg_match("/^\d+$/", $data['staff_cd']) ) {
                         $error[] = "社員CDが不正です。";
                     }
         
                     //対象年度を確認
                     if ( !isset($data['target_year']) && emp($data['target_year']) ){
                         $error[] = "対象年度が取得できませんでした。";
                     } elseif( !preg_match("/^\d{4}$/", $data['target_year']) ) {
                         $error[] = "対象年度が不正です。";
                     }
         
                     //社員名を確認
                     if ( !isset($data['name']) && emp($data['name']) ){
                         $error[] = "社員名が取得できませんでした。";
                     }
         
                     //社員名カナを確認
                     if ( !isset($data['name_kana']) && emp($data['name_kana']) ){
                         $error[] = "社員名カナが取得できませんでした。";
                     }
         
                     //性別を確認
                     if ( !isset($data['sex']) && emp($data['sex']) ){
                         $error[] = "性別が取得できませんでした。";
                     }
         
                     //メールアドレスを確認
                     if ( !isset($data['mail']) && emp($data['mail']) ){
                         $error[] = "メールアドレスが取得できませんでした。";
                     } elseif ( !preg_match('|^[0-9a-z_./?-]+@([0-9a-z-]+\.)+[0-9a-z-]+$|', $data['mail']) ) {
                         $errors[] = "メールアドレスが不正です。";
                     }
         
                     //本部CDを確認
                     if ( !isset($data['department_cd']) && emp($data['department_cd']) ){
                         $error[] = "本部CDが取得できませんでした。";
                     }
         
                     //部CDを確認
                     if ( !isset($data['division_cd']) && emp($data['division_cd']) ){
                         $error[] = "部CDが取得できませんでした。";
                     }
         
                     //課・支店CDを確認
                     if ( !isset($data['section_cd']) && emp($data['section_cd']) ){
                         $error[] = "課・支店CDが取得できませんでした。";
                     }
         
                     //職種CDを確認
                     if ( !isset($data['occupation_cd']) && emp($data['occupation_cd']) ){
                         $error[] = "職種CDが取得できませんでした。";
                     }
         
                     //職種名を確認
                     if ( !isset($data['occupation']) && emp($data['occupation']) ){
                         $error[] = "職種名が取得できませんでした。";
                     }
         */
         //権限を確認
         if (isset($data['group_cd'])) {
             if (is_array($data['group_cd']) && in_array(ACCOUNT_NEW_EMP, $data['group_cd']) && count($data['group_cd']) > 1) {
                 $error[] = "新入社員権限は他の権限と併用できません。";
             }
         }
         //退職フラグを確認
         if (isset($data['retire_flg']) && !preg_match("/^\\d\$/", $data['retire_flg'])) {
             $error[] = "退職フラグ指定値が不正です。";
         }
         //件数分の判定処理
         $cnt = 0;
         for ($i = 0; $i < 3; $i++) {
             //トレーナー確認
             if (isset($data["department_cd_trainer{$i}"]) && !emp($data["department_cd_trainer{$i}"])) {
                 if (!isset($data["user_id_trainer{$i}"]) || emp($data["user_id_trainer{$i}"])) {
                     $error[] = "担当OJTトレーナー" . ($i + 1) . "人目の「トレーナー名」が選択されていません。";
                 }
             }
             //責任者確認
             /*
                             if( isset($data["department_cd_admin{$i}"]) && !emp( $data["department_cd_admin{$i}"] ) ){
                                 if( !isset($data["user_id_admin{$i}"]) || emp( $data["user_id_admin{$i}"] ) ){
                                     $error[] = "担当OJT責任者".($i+1)."人目の「責任者名」が選択されていません。";
                                 }
                             }
             */
             //責任者所属選択あり、責任者名選択なし/期間指定なし
             if (isset($data["department_cd_admin{$i}"]) && !emp($data["department_cd_admin{$i}"])) {
                 if (!isset($data["user_id_admin{$i}"]) || emp($data["user_id_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「責任者名」が選択されていません。";
                 }
                 if (!isset($data["start_date_admin{$i}"]) || emp($data["start_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」を入力されていません。";
                 }
                 if (!isset($data["end_date_admin{$i}"]) || emp($data["end_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」を入力されていません。";
                 }
             }
             //責任者紐付き期間確認
             //半角数字8桁・正しい日付けか
             if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"])) {
                 $year = getYear($data["start_date_admin{$i}"]);
                 $month = getMonth($data["start_date_admin{$i}"]);
                 $day = getDays($data["start_date_admin{$i}"]);
                 if (!preg_match("/^\\d{8}\$/", $data["start_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」は半角数字8桁で入力してください。";
                 } elseif (!checkdate($month, $day, $year)) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」が不正です。";
                 }
             }
             if (isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
                 $year = getYear($data["end_date_admin{$i}"]);
                 $month = getMonth($data["end_date_admin{$i}"]);
                 $day = getDays($data["end_date_admin{$i}"]);
                 if (!preg_match("/^\\d{8}\$/", $data["end_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」は半角数字8桁で入力してください。";
                 } elseif (!checkdate($month, $day, $year)) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」が不正です。";
                 }
             }
             if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"]) && isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
                 //開始日が終了日より過去か
                 if ($data["start_date_admin{$i}"] > $data["end_date_admin{$i}"]) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」は「担当終了日」より過去を入力してください。";
                 }
             }
             if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"]) || isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
                 //責任者所属選択なし、期間指定あり
                 if (!isset($data["department_cd_admin{$i}"]) || emp($data["department_cd_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の所属部署が選択されていません。";
                 }
                 //責任者名選択なし、期間指定あり
                 if (!isset($data["user_id_admin{$i}"]) || emp($data["user_id_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「責任者名」が選択されていません。";
                 }
             }
         }
     }
     // チェック結果を返す
     if (count($error) > 0) {
         return $error;
     } else {
         return false;
     }
 }
예제 #21
0
<?php

$strSQL = sprintf("\n  SELECT\n    *\n  FROM\n    student\n  WHERE\n    instructorID = '%s'\n  ", mysql_real_escape_string($confUserID));
if ($confUserType == 'instructor') {
    $objQuery = mysql_query($strSQL);
    if ($objQuery && mysql_num_rows($objQuery) > 0) {
        while ($row = mysql_fetch_array($objQuery)) {
            $gendata[] = array('studentID' => $row['studentID'], 'firstName' => $row['firstName'], 'lastName' => $row['lastName'], 'cardID' => "<span style='display:none;'>" . $row['cardID'] . "</span>", 'secondCardID' => "<span style='display:none;'>" . $row['secondCardID'] . "</span>", 'atd' => "<button name='viewAtd' data-studentID='" . $row['studentID'] . "'>ดูเวลาเรียน</button>", 'sco' => "<button name='viewSco' data-studentID='" . $row['studentID'] . "'>ดูคะแนน</button>", 'grade' => getAvgGrade($row['studentID'], getTerm(), getYear()));
        }
        $data['data'] = $gendata;
        echo json_encode($data);
    }
}
예제 #22
0
 /**
  * 週報(トレーナー、責任者)DB登録可否判定
  * 登録可能の場合、trueを返す
  *
  * @param
  */
 function isEntryEnabledFeedback($sql_flg, $staff_id, $term_id, $boss_id, $boss_flg, $data_type, $wm_flg)
 {
     $isEnabled = true;
     $sql = "SELECT COUNT(*) as cnt FROM `t_feedback` WHERE `staff_id` = :staff_id AND `term_id` = :term_id AND `data_type` = :data_type";
     $searchParam = array('staff_id' => $staff_id, 'term_id' => $term_id['id'], 'data_type' => $data_type);
     if ($boss_flg == 'trainer') {
         $searchParam['trainer_id'] = $boss_id;
         $sql .= ' AND `trainer_id` = :trainer_id';
     } elseif ($boss_flg == 'admin') {
         $searchParam['admin_id'] = $boss_id;
         $sql .= ' AND `admin_id` = :admin_id';
     }
     // データベースに接続する
     $conn = DbControl::getInstance();
     $conn->dbConnect(DbControl::SLAVE_DB);
     // クエリを実行する
     $res = $conn->dbExecFetch(DbControl::SLAVE_DB, $sql, $searchParam);
     if (isset($sql_flg) && !empty($sql_flg) && $sql_flg == 'insert') {
         if (isset($res) && $res['cnt'] > 0) {
             $isEnabled = false;
         } else {
             $isEnabled = true;
         }
     } elseif (isset($sql_flg) && !empty($sql_flg) && $sql_flg == 'update') {
         if (isset($res) && $res['cnt'] > 0) {
             if ($wm_flg == 'weekly') {
                 $tense = $this->tenseWeekly($term_id['id']);
             } elseif ($wm_flg == 'monthly') {
                 $target_year = getYear($this->request['target_date']);
                 $target_month = getMonth($this->request['target_date']);
                 $tense = tenseMonthly($target_year, $target_month);
             }
             if ($tense) {
                 $isEnabled = true;
             } else {
                 $isEnabled = false;
             }
         } else {
             $isEnabled = false;
         }
     }
     // データベースを切断する
     $conn->dbClose(DbControl::SLAVE_DB);
     return $isEnabled;
 }
예제 #23
0
						It is highly recommended to enable javascript in your browser, the system may not function <em>as intended</em> with it disabled.
					</div>
				</div>
			</noscript>
			<div id='page'>
				<div id='page_box'>  
					<?
						include "includes/page_content.php";
					?>
				</div>
			</div>
			<div id='bottom'>
				<div id='bottom_box'>  
					<div id='content' align='right'>
						©<?php 
echo getYear();
?>
 Werkbot Studios. All rights reserved.
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<?
	}else{
		print "<h1>The content management system is not installed, <a href='../install.php'>please go to the install page</a>.</h1>";
	}
	//CLOSE OUT CONNECTION TO THE DATABASE
		$db->DB_CLOSE($database_connection);
?>
 function setMonth($month, $year)
 {
     $month = (int) $month;
     $year = (int) $year;
     if ($month < 1 || $month > 12 || $year < 2000) {
         $month = kbdate('m');
         $year = getYear();
     }
     $this->month = $month;
     if ($this->month < 10) {
         $this->month = '0' . $this->month;
     }
     $this->year = $year;
     if ($month == 1) {
         $this->pyear = $year - 1;
         $this->pmonth = 12;
     } else {
         $this->pyear = $year;
         $this->pmonth = $month - 1;
     }
     if ($this->month == 12) {
         $this->nmonth = 1;
         $this->nyear = $this->year + 1;
     } else {
         $this->nmonth = $this->month + 1;
         $this->nyear = $this->year;
     }
     $this->periodName = 'Month';
     $this->period = date('F', mktime(0, 0, 0, $this->month, 1, $this->year)) . ', ' . $this->year;
     $this->currentTime = $this->month == kbdate('m') && $this->year == kbdate('Y');
     $this->previousPeriodLink = 'm=' . $this->pmonth . '&amp;y=' . $this->pyear;
     $this->nextPeriodLink = 'm=' . $this->nmonth . '&amp;y=' . $this->nyear;
     $this->currentPeriodLink = 'm=' . $this->month . '&amp;y=' . $this->year;
 }
예제 #25
0
$PAGE = "S_REPORT_MONTHLY_EDIT";
require_once '../_init_auth.php';
require_once 'report/class.Report.php';
require_once 'target/class.Target.php';
try {
    $param['page'] = $PAGE;
    $report = new report($request);
    $target = new target($request);
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        $termid = getTermId($date);
        $param['date'] = $date;
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
        $month = sprintf('%01d', $month);
        $param['target_date'] = $date;
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    //新入社員情報取得
    if (isset($request['id'])) {
        $employee = $report->getEmpData($request['id']);
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
예제 #26
0
            echo "\n                        <tr><td colspan=2>&nbsp;</td></tr>\n                        <tr>\n\t\t\t\t<td><a href='aksi.php?module=pembelian_barang&act=batal'>BATAL</a></td>\n\n\t\t\t\t<td>\n\t\t\t\t\t<input type='hidden' name='idSupplier' value='" . $_SESSION['idSupplier'] . "'>\n\t\t\t\t\t<input type=submit value='Simpan' tabindex=23>\n\t\t\t\t</td>\n\t\t\t</tr>\n                        </table></form>\n\t\t\t";
            //fixme : Pembatalan Nota (code di atas & bawah komentar ini) perlu merujuk ke user ybs,
            // agar jangan keliru menghapus nota yang sedang di input oleh user yang lainnya
        } else {
            echo "Belum ada barang yang dibeli<br /><a href='aksi.php?module=pembelian_barang&act=batal'>BATAL</a>";
        }
        break;
    case "laporanpembeliantanggal":
        // ===============================================================================================================
        echo "<h2>Laporan Pembelian (per Tanggal)</h2>\n            <form method=POST action='?module=pembelian_barang&act=laporanpembeliantanggal&action=pilihtanggal'>\n\n                <br />Periode Laporan : Bulan :\n                <select name=bulanLaporan>";
        $dataBulan = getMonth();
        while ($bulan = mysql_fetch_array($dataBulan)) {
            echo "<option value={$bulan['bulan']}>" . getBulanku($bulan[bulan]) . "</option>";
        }
        echo "</select>, Tahun :\n            <select name=tahunLaporan>";
        $dataTahun = getYear();
        while ($tahun = mysql_fetch_array($dataTahun)) {
            echo "<option value={$tahun['tahun']}>{$tahun['tahun']}</option>";
        }
        echo "</select>\n            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit value=Lihat>\n            </form>\n            ";
        if ($_GET[action] == 'pilihtanggal') {
            // ------------------------------------------------------------
            $sql = "SELECT tglTransaksiBeli, idTransaksiBeli FROM transaksibeli\n\t\t\t\tWHERE month(tglTransaksiBeli)='{$_POST['bulanLaporan']}' AND year(tglTransaksiBeli)='{$_POST['tahunLaporan']}'\n\t\t\t\tORDER BY tglTransaksiBeli, idTransaksiBeli ASC";
            $hasil = mysql_query($sql);
            ?>
						<hr />
						<form method=GET action='?module=pembelian_barang&act=detaillaporan'>

							<input type=hidden name=module value=pembelian_barang>
							<input type=hidden name=act value=detaillaporan>
							Tanggal :
예제 #27
0
/**
 * Return the number of weeks in the given year.
 * @param integer $year the year to count weeks for. Default is the current year.
 * @return integer the number of weeks in the given year.
 */
function getWeeks($year = null)
{
    if (is_null($year)) {
        $year = getYear();
    }
    $weeks = date('W', mktime(1, 0, 0, 12, 31, $year));
    return $weeks == 1 ? 52 : $weeks;
}
예제 #28
0
$nodata = array('Rating' => 0, 'Tags' => array());
if ($mysqlc == null) {
    debuglog("Can't Do ratings stuff as no SQL connection!", "RATINGS", 1);
    header('HTTP/1.0 403 Forbidden');
    exit(0);
}
$title = array_key_exists('title', $_POST) ? $_POST['title'] : null;
$artist = array_key_exists('artist', $_POST) ? $_POST['artist'] : null;
$trackno = array_key_exists('trackno', $_POST) ? $_POST['trackno'] : null;
$duration = array_key_exists('duration', $_POST) ? $_POST['duration'] : null;
$albumartist = array_key_exists('albumartist', $_POST) ? $_POST['albumartist'] : $artist;
$albumuri = array_key_exists('albumuri', $_POST) ? $_POST['albumuri'] : null;
$image = array_key_exists('image', $_POST) ? $_POST['image'] : null;
$album = array_key_exists('album', $_POST) ? $_POST['album'] : null;
$uri = array_key_exists('uri', $_POST) ? $_POST['uri'] : null;
$date = array_key_exists('date', $_POST) && $_POST['date'] != 0 ? getYear($_POST['date']) : null;
$urionly = array_key_exists('urionly', $_POST) ? true : false;
$disc = array_key_exists('disc', $_POST) ? $_POST['disc'] : 1;
$trackimage = array_key_exists('trackimage', $_POST) ? $_POST['trackimage'] : null;
if (substr($image, 0, 4) == "http") {
    $image = "getRemoteImage.php?url=" . $image;
}
$attributes = array_key_exists('attributes', $_POST) ? $_POST['attributes'] : null;
if (array_key_exists('attribute', $_POST) && array_key_exists('value', $_POST)) {
    debuglog("WARNING! Old-style attribute-value pair. Update the code!", "USERRATING", 2);
    $attributes = array(array("attribute" => $_POST['attribute'], "value" => $_POST['value']));
}
open_transaction();
switch ($_POST['action']) {
    case 'getplaylist':
        preparePlaylist();
예제 #29
0
        echo $optionyear;
        ?>
年9月-<?php 
        echo $optionyear + 1;
        ?>
年9月</option>
	<?php 
    }
}
?>
	 </select>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 年份选择:<select name="i_time" onchange="window.location.href ='itemctongji.php?i_time_year='+this.value">
	 <option value="0">...</option>
	 <?php 
$year = getYear();
for ($i = 0; $i < 4; $i++) {
    $optionyear = $year - $i;
    if ($_GET['i_time_year'] == $optionyear) {
        ?>
	 	<option selected value="<?php 
        echo $optionyear;
        ?>
"><?php 
        echo $optionyear;
        ?>
</option>
	 
	 <?php 
    } else {
        ?>
예제 #30
0
<?php

$subjectID = $_REQUEST['subjectID'];
$scoreType = $_REQUEST['scoreType'];
$scoreMax = $_REQUEST['scoreMax'];
$scoreID = $_REQUEST['scoreID'];
$addStatus = $_REQUEST['addStatus'];
$date = date("Y-m-d H:i:s", time());
if ($addStatus == '1') {
    if ($scoreType == 'GRADE') {
        $data['status'] = 'SUCCESS';
        echo json_encode($data);
        exit;
    }
    $strSQL = sprintf("\n      INSERT INTO\n        scoreinfo\n        (\n        SELECT\n          NULL,\n          '%s',\n          registerID,\n          '%s',\n          '%s',\n          '%s'\n        FROM\n          registerinfo\n        WHERE\n          term = '%s' AND\n          year = '%s'\n        )\n      ", mysql_real_escape_string($subjectID), mysql_real_escape_string($date), mysql_real_escape_string($scoreType), mysql_real_escape_string($scoreMax), mysql_real_escape_string(getTerm()), mysql_real_escape_string(getYear()));
    $objQuery = mysql_query($strSQL);
    $scoreID = mysql_insert_id();
    $data['status'] = 'SUCCESS';
    $data['strSQL'] = $strSQL;
    $data['scoreID'] = $scoreID;
} elseif ($addStatus == '2') {
    $strSQL = sprintf("\n      UPDATE\n        `scoreinfo`\n      SET\n        type = '%s',\n        maxScore = '%s'\n      WHERE\n        scoreID = '%s'\n      ", mysql_real_escape_string($scoreType), mysql_real_escape_string($scoreMax), mysql_real_escape_string($scoreID));
    $objQuery = mysql_query($strSQL);
    $data['status'] = 'SUCCESS';
    $data['strSQL'] = $strSQL;
    $data['scoreID'] = $scoreID;
} else {
    $data['status'] = 'FAIL';
}
echo json_encode($data);