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
<?php | |
class langvalidate extends lang | |
{ | |
public $v1='is required'; | |
public $v2='must be between'; | |
public $v3='and'; | |
public $v4='must be between 2 and 32 characters long'; | |
public $v5='must only contain letters, numbers and ! # $ % * / ? | ^ { } ` ~ & + - = _ and must start with a letter'; | |
public $stringMsg = 'characters long'; |
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
<?php | |
public static function string(&$value, $display, $min, $max, $required=false) | |
{ | |
$lang = lang :: get("validate"); | |
$value = trim(strip_tags($value)); | |
$len = strlen($value); | |
if($len == 0) | |
if(!$required) |
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
<?php | |
/* * | |
* Usage: | |
* CrmEmployees :: getUsers(); | |
*/ | |
public static function getUsers($userid=null, $cols=null) | |
{ | |
$valid_columns = array( | |
'UID'=>1, |
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
<?php | |
function fun() | |
{ | |
echo " "; | |
$argv = func_get_args(); | |
switch(count($argv)) | |
{ | |
case 1: | |
echo is_array($argv[0]) ? "Value is an array" : "Value is NOT an array"; |
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
HTTP::redirect(Route::url('site/admin', [ | |
'controller' => 'import', | |
'action' => 'decline_staff', | |
'id' => $request->param('id'), | |
])); |
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
{ "unrestricted": | |
{ | |
"supervision": | |
{ | |
"question":"What describes your assessment of the Supervision and Guidance you typically received", | |
"answers": | |
{ | |
"1":"Need much more", | |
"2":"Need a little more", | |
"3":"Just Right", |
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
<?php | |
// Returns an associative array of the lowest ctlControl objects | |
// @return Associative array [ $control_name => $control_property ] | |
// @param $control Control Object to scan | |
// @param $ctlControls Always send an empty array, it's the same array that is passed through recursion | |
// @param $type Associate array [$control_type => $control_property, $control_type=>$control_property, ... ] | |
// Valid types ($control_type) [ ctlControl | ctlTextBox | ctlSelect | etc.. ] | |
// Valid properties ($control_property) [ null | name | value | style | properties | etc ] | |
// Note: If no $control_property is set, the function defaults to the actual ctl Object |
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
<?php | |
// Validate that the email isn't used by another staff user | |
elseif ($this->web_enabled) | |
{ | |
$rules['email'][] = [ | |
['Model_Account_User_Site_Staff', 'unique_staff_email']]; | |
} |
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
<?php | |
/* | |
onEdit: | |
1. Clear the form | |
2. Select query for the CustomerID on invoices table | |
3. Call WebCRM::populateControls() | |
4. Call a method named populateItemList($invoice_id) | |
4a) populateItemList() should query the invoice_lines table where InvoiceID = $invoice_id | |
4b) It should then iterate through the results and create the controls for each row (ctlLabel x5, ctlLinkButton x2) |
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
<?php | |
class aParent { | |
public $a = 'a'; | |
protected $b = 'b'; | |
private $c = 'c'; | |
} | |
class aChild extends aParent { | |
OlderNewer