Season 3, Episode 8   FAN RATING: 9.07   Guide |  Discuss

The show's Jeannie. Written by ("Samantha Carter") puts in

This is also .

Did You Know? The episode Kaleb is also ...

0 ): break ; default: break; } */ /* //$id = filter_input(INPUT_POST, 'id', FILTER_VALIDATE_INT); //$countrycode = filter_input(INPUT_POST, "countrycode", FILTER_SANITIZE_STRING); if(is_null(NULL)){ echo "is_null(NULL)
"; } $vals = [0,'0',1,w2,3.45,'3,45','sasd',01,'01',999999999999,'',' ',NULL] ; $vals_str = "[0,'0',1,w2,3.45,'3,45','sasd',01,'01',999999999999,'',' ',NULL]" ; echo '

'; echo "gettype of $vals_str
"; foreach ($vals as $value) { $valtype = gettype($value); if( $valtype == 'string' ) { $value = str_replace(',','.',$value); } $valtype = gettype($value); echo "$value is {$valtype}"; // --------------------- if($value === 0 or $value === '0'){ echo ".....0 and '0' are integer" ; } // for '01' if( $valtype == 'string' and $value * 1 / (int)$value === 1 ) { echo ".....integer" ; } // for '3,45' if( $valtype == 'string' and $value * 1 !== (int)$value ) { echo ".....double" ; } echo '
'; //} } echo '

'; echo "is_int of $vals_str
"; f oreach ($vals as $value) { $valtype = is_int($value); echo "is_int $value ? {$valtype}
"; } echo '

'; echo "(int) of $vals_str
"; f oreach ($vals as $value) { echo "(int)$value=".(int)$value; if($value === 0 or $value === '0'){ echo ".....0 and '0' are integer" ; } echo '
'; } echo '

'; */ /* else { //if( (int)$value === $value ){ // '01' should be integer if( (int)$value / $value = 1 ){ echo ".....integer" ; } } */ ?> /** * ALTER TABLE `admins` ADD `email` VARCHAR(100) NULL AFTER `addedby`; * http://sspc2:8083/fwphp/glomodul/user/ * J:\awww\www\fwphp\glomodul\user\index.php * Instantiates Home_ ctr cls - router, dispatcher * * step 1 in Module U S E R T B L C R U D on B12phpfw CRUD code skeleton. * cs01=bootstraping, cs02=INIT; config; routing, cs03=dispaching, cs04. PROCESSING (model or business logic), cs05. OUTPUT (view) * see https://www.startutorial.com/articles/view/php-crud-tutorial-part-1 of 4 (Xsu Ding) * J:\awww\www\fwphp\glomodul\z_examples\02_mvc\03xuding_glob\index.php */ // Db_ allsites.php may be named abstract class AbstractDataMapper.php // - encapsulates AS MUCH MAPPING LOGIC AS POSSIBLE // - couple of generic row object finders (get cursor, not record sets) // - read row objects is in Tblname_crud domain objects so I do not do so : // logic required for pulling in data from a specified table which is then used // for reconstituting domain objects in a valid state. Because reconstitutions // should be delegated down the hierarchy to refined implementations, // newrow_obj() (createEntity()) method has been DECLARED ABSTRACT. /* //********************************************************************** // MODULE AUTOLOADER DO NOT DELETE !!!!!!!!! // (not used here but may be needed in some modules) //********************************************************************** namespace Model; //FUNCTIONAL NAME SPACING (not dir names ee positional) //Instead of require 'm.php'; require 'v.php'; require 'c.php'; : // ***** namespaced cls name --> cls script path ***** class Autoloader { private static function get_module_cls_script_path($class, $nsprefix) { //replace name space backslash to current operating system directory separator $DS = DIRECTORY_SEPARATOR ; $cls_script_path = __DIR__ .'/' . str_replace( [$nsprefix,'\\'] //substrings to replace , ['', '/'] //replacements , $class //in string ).'.php'; //append cls script extension and convert (to Windows) backslash : $cls_script_path = str_replace(['/','\\'], [$DS,$DS], $cls_script_path) ; return $cls_script_path ; } public static function autoload($class) //namespaced className { // ********** 1. module_ cls_ script_ path ********** eg B12phpfw\\clickmeModule $cls_script_path1 = self::get_module_cls_script_path($class, $nsprefix1='Model') ; $cls_script_path2 = self::get_module_cls_script_path($class, $nsprefix2='Model\\') ; $cls_script_path3 = self::get_module_cls_script_path($class, $nsprefix3='ModelMapper\\') ; $cls_script_path4 = self::get_module_cls_script_path($class, $nsprefix4='CoreDB\\') ; // ********** 2. cls_ script_ path_ external_ module ********** //$cls_script_path = $_SERVER['DOCUMENT_ROOT'].'/vendor/autoload.php'; // ********** 3. r e q u i r e cls_ script_ path ********** switch (true) { case file_exists($cls_script_path1): include_once $cls_script_path1 ; break; case file_exists($cls_script_path2): include_once $cls_script_path2; break; case file_exists($cls_script_path3): include_once $cls_script_path3; break; case file_exists($cls_script_path4): include_once $cls_script_path4; break; //case file_exists($cls_script_path_external_m): include_once $cls_script_path_external_m; break; default: if ('1') { echo 'For namespaced class '. $class . '
Possible CLASS SCRIPTS NAMES derived from functional namespaces,' . '
ee from vendor name space prefixes :' . "
\"$nsprefix1\" or \"$nsprefix2\" or \"$nsprefix3\" or \"$nsprefix4\" are :" ; echo '
';
            print_r([$cls_script_path1, $cls_script_path2, $cls_script_path3, $cls_script_path4]);
            //print_r('Namespaced class '. $class .' has not class script ?');
            echo '
'; } break; } } } //spl_autoload_register('config\Autoloader::autoload'); */ /* // WAS in index.php (see 03xuding dir) : // !!!!!!!!! THIS IS NOW IN Home_ctr.php (B12phpfw) !!!!!!!!!!!! require_once(__DIR__.'/confglo.php'); require_once __DIR__.'/database.php'; $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // see J:\awww\www\fwphp\glomodul\z_examples\02_mvc\03xuding include_once 'hdr.php'; switch (true) { case isset($_GET['c']): include 'create.php'; break; case isset($_GET['r']): include 'read.php'; break; case isset($_GET['u']): include 'update.php'; break; case isset($_GET['d']): include 'delete.php'; break; default: include_once 'home.php'; break; } include_once 'ftr.php'; //e n d !!!!!!!!! THIS IS IN Home_ctr.php !!!!!!!!!!!! */ /* To do : Add pagination to PHP CRUD grid - done in Blog module Implement search function - done in Blog module Build image upload - done in Blog module Use custom inputs such as select box/radio box */ /* class PDOConnection { private static $dbhost = "127.0.0.1"; private static $dbname = "mvcblog"; private static $dbuser = "mvcuser"; private static $dbpass = "mvcblogpass"; private static $db_singleton = null; public static function getInstance() { if (self::$db_singleton == null) { self::$db_singleton = new PDO( "mysql:host=".self::$dbhost.";dbname=".self::$dbname.";charset=utf8", // connection string self::$dbuser, self::$dbpass, array( // options PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ) ); } return self::$db_singleton; } } */