-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
authored and
unknown
committed
Feb 6, 2016
1 parent
91d11c4
commit a45bf8a
Showing
663 changed files
with
139,422 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require_once("functions/bootstrap.php"); | ||
require_once(CLASS_DIR."/admin.class.php"); | ||
|
||
$kibopage = new adminpage; | ||
$kibopage->run(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require_once("functions/bootstrap.php"); | ||
require_once(CLASS_DIR."/attplan.class.php"); | ||
|
||
$kibopage = new attplan; | ||
$kibopage->run(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
|
||
|
||
class Assert { | ||
|
||
public function isId($num, $message=null) { | ||
$value = (int)$num; | ||
if((string)$value !== (string)$num || $value < 1) { | ||
if(!$message) { | ||
$message = "positve not zero id expected. got '".$num."'"; | ||
} | ||
trigger_error($message,E_USER_ERROR); | ||
} | ||
} | ||
|
||
public function isNumeric($num, $message=null) { | ||
if(is_numeric($num) === false) { | ||
if(!$message) { | ||
$message = "numeric value expected. got '".$num."'"; | ||
} | ||
trigger_error($message,E_USER_ERROR); | ||
} | ||
} | ||
|
||
public function isIdArray($num,$message=null) { | ||
if(!$message) { | ||
$message = "check for id array"; | ||
} | ||
if(is_array($num)) { | ||
if(count($num) > 0) { | ||
for($i = 0; $i < count($num);$i++) { | ||
Assert::isId($num[$i],$message.", id at index ".$i." invalid"); | ||
} | ||
} else { | ||
trigger_error($message.", id array is empty",E_USER_ERROR); | ||
} | ||
} else { | ||
Assert::isId($num,$message.", "); | ||
} | ||
} | ||
|
||
public function isTrue($value, $message=null) { | ||
if($value !== true) { | ||
if(!$message) { | ||
$message = "expected true"; | ||
} | ||
trigger_error($message,E_USER_ERROR); | ||
} | ||
} | ||
|
||
public function notEmpty($value, $message=null) { | ||
$result = false; | ||
if( !is_numeric($value) ) { | ||
if( is_array($value) ) { // Is array? | ||
if( count($value, 1) < 1 ) $result = true; | ||
} | ||
elseif(!isset($value) || strlen(trim($value)) == 0) { | ||
$result = true; | ||
} | ||
} | ||
if($result === true) { | ||
if(!$message) { | ||
$message = "expected non empty value"; | ||
} | ||
trigger_error($message,E_USER_ERROR); | ||
} | ||
} | ||
} | ||
|
||
?> |
Oops, something went wrong.