<?php
ini_set('display_errors', true);
error_reporting(E_ERROR | E_PARSE | E_NOTICE | E_WARNING);
$base='ontime/';
$AdminPassword='OT2021Free';
include_once($base."OnTime.php");
$demo=new OnTime();
echo "**********+++++++++++ <br> Basic Table Demo <br> **********+++++++++++ <br> <br>";
echo "********** <br> Create Class <br> ********** <br> <br>";
$demo->ot_error('basic content exist').'<br>';
echo "**********+++++++++++ <br> Conecting like admin <br> **********+++++++++++ <br> <br>";
echo "Connect('admin','OT2021Free') ";
$demo->Connect('admin',$AdminPassword);
echo "<br>";$demo->ot_error("Connected!!!");echo "<br>";
echo "**********+++++++++++ <br> Create Demostration user & groups (if installed) <br> **********+++++++++++ <br> <br>";
$demo->CrtUsr('Demo','12345','active','Demostration user','Demo 1');
$demo->CrtUsr('DEMO','12345','active','Demostration user','Demo 2');
$demo->CrtUsr('demo','12345','active','Demostration user','Demo 3');
if ($demo->ot_feature('grp')){
$demo->CrtGrp('Administrators','Administrators for the main Feature','admins');
$demo->CrtGrp('Everyone','All users','EvrAll');
$demo->CrtGrp('AdminUsers','Administrators on User Featrute','AUser');
$demo->GrpAddUsr('Everyone','DEMO','access');
$demo->GrpAddUsr('AdminGroups','DEMO','owner');
$demo->GrpAddUsr('AdminGroups','Demo','create');
$demo->GrpAddUsr('AdminGroups','demo','access');
}
echo "********** <br> Features with basic content<br> ********** <br> <br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwFtrBsc() ";
$demo->ot_show($demo->ShwFtrBsc());
echo "********** <br> Create <br> **********+ <br> <br>";
echo "CrtFtrBsc('Basic') ";
$demo->CrtFtrBsc('Basic');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "CrtFtrBsc('Non') ";
$demo->CrtFtrBsc('Non');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "CrtFtrBsc('grp') ";
$demo->CrtFtrBsc('grp');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "CrtFtrBsc('usr') ";
$demo->CrtFtrBsc('usr');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwFtrBsc() ";
$demo->ot_show($demo->ShwFtrBsc());
echo "********** <br> Basic Content<br> ********** <br> <br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwBscIn('Basic') ";
$demo->ot_show($demo->ShwBscIn());
echo "********** <br> Add <br> **********+ <br> <br>";
echo "AddCntIn('first','My First Content','Basix') ";
$demo->AddCntIn('first','My First Content','Basix') ;
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "AddCntIn('first','My First Content','basic') ";
$demo->AddCntIn('first','My First Content','basic') ;
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "AddCntIn('Color','names in spanish and english','basic') ";
$demo->AddCntIn('Color','names in spanish and english','basic') ;
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwBscIn('basic') ";
$demo->ot_show($demo->ShwBscIn());
echo "********** <br> Data Basic Content<br> ********** <br> <br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntIn('Color','basic') ";
$demo->ot_show($demo->ShwBscIn('Color','basic'));
echo "********** <br> Insert <br> **********+ <br> <br>";
echo "InsCntIn('Rojo','Red','Color','basic') ";
$demo->InsCntIn('Rojo','Red','Color','basic');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "InsCntIn('Naranja',Strange Yellow,'Color','basic') ";
$demo->InsCntIn('Naranja','Strange Yellow','Color','basic');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "InsCntIn('Moraido',Purple,'Color','basic') ";
$demo->InsCntIn('Moraido','Purple','Color','basic');
echo "<br>";$demo->ot_error("Added!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntIn('Color','basic') ";
$demo->ot_show($demo->ShwCntIn('Color','basic'));
echo "********** <br> Upsert <br> **********+ <br> <br>";
echo "UpnCntIn('Naranja','orange','Color','basic') ";
$demo->UpnCntIn('Naranja','orange','Color','basic');
echo "<br>";$demo->ot_error("Done!!!");echo "<br>";
echo "UpnCntIn('Amarillo','Yellow','Color','basic') ";
$demo->UpnCntIn('Amarillo','Yellow','Color','basic');
echo "<br>";$demo->ot_error("Done!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntIn('Color','basic') ";
$demo->ot_show($demo->ShwCntIn('Color','basic'));
echo "********** <br> Update <br> **********+ <br> <br>";
echo "UpnCntIn('Naranja','Orange','Color','basic') ";
$demo->UpnCntIn('Naranja','Orange','Color','basic');
echo "<br>";$demo->ot_error("Done!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntIn('Color','basic') ";
$demo->ot_show($demo->ShwCntIn('Color','basic'));
echo "********** <br> Delete <br> **********+ <br> <br>";
echo "DltCntIn('Moraido','Color','basic') ";
$demo->DltCntIn('Moraido','Color','basic');
echo "<br>";$demo->ot_error("Done!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntIn('Color','basic') ";
$demo->ot_show($demo->ShwCntIn('Color','basic'));
echo "********** <br> Safety for Data Basic Content<br> ********** <br> <br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> Add Anonimus user read <br> **********+ <br> <br>";
echo "AnnBscInAdd('Color','basic') ";
$demo->AnnBscInAdd('Color','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> Add Public (conected) user read <br> **********+ <br> <br>";
echo "PblBscInAdd('Color','basic') ";
$demo->PblBscInAdd('Color','basic');
echo "<br>";$demo->ot_error("Punlic User Allow read!!!");echo "<br>";
echo "********** <br> Remove Anonimus user read <br> **********+ <br> <br>";
echo "AnnBscInRmv('Color','basic') ";
$demo->AnnBscInRmv('Color','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> Add Public (conected) user read <br> **********+ <br> <br>";
echo "PblBscInAdd('Color','basic') ";
$demo->PblBscInAdd('Color','basic');
echo "********** <br> Add Anonimus user read <br> **********+ <br> <br>";
echo "AnnBscInAdd('Color','basic') ";
$demo->AnnBscInAdd('Color','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> Add user level <br> **********+ <br> <br>";
echo "UsrBscInAdd('Color','DEMO','change','basic') ";
$demo->UsrBscInAdd('Color','DEMO','change','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "UsrBscInAdd('Color','Demo','update','basic') ";
$demo->UsrBscInAdd('Color','Demo','update','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> Add Group level <br> **********+ <br> <br>";
echo "GrpBscInAdd('Color','Everyone','change','basic') ";
$demo->GrpBscInAdd('Color','Everyone','change','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "GrpBscInAdd('Color','AdminGroups','update','basic') ";
$demo->GrpBscInAdd('Color','AdminGroups','update','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> change user level <br> **********+ <br> <br>";
echo "UsrBscInChg('Color','DEMO','update','basic') ";
$demo->UsrBscInChg('Color','DEMO','update','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> change Group level <br> **********+ <br> <br>";
echo "GrpBscInChg('Color','AdminGroups','change','basic') ";
$demo->GrpBscInChg('Color','AdminGroups','change','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> delete user level <br> **********+ <br> <br>";
echo "UsrBscInDlt('Color','DEMO','basic') ";
$demo->UsrBscInDlt('Color','DEMO','basic');
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> delete Group level <br> **********+ <br> <br>";
echo "GrpBscInDlt('Color','AdminGroups','basic') ";
$demo->GrpBscInDlt('Color','AdminGroups','basic');
echo "<br>";$demo->ot_error("Anonimus User Allow read!!!");echo "<br>";
echo "********** <br> Show <br> **********+ <br> <br>";
echo "ShwCntInSft('Color','basic') ";
$demo->ot_show($demo->ShwCntInSft('Color','basic'));
echo "********** <br> Show Basic Content <br> **********+ <br> <br>";
echo "ShwBscIn('basic') ";
$demo->ot_show($demo->ShwBscIn('basic'));
echo "********** <br> Remove Basic Content <br> **********+ <br> <br>";
echo "RmvCntIn('Color',basic') ";
$demo->ot_show($demo->RmvCntIn('Color','basic'));
echo "<br>";$demo->ot_error("Delete!!!");echo "<br>";
echo "********** <br> Show Basic Content <br> **********+ <br> <br>";
echo "ShwBscIn('basic') ";
$demo->ot_show($demo->ShwBscIn('basic'));
echo "**********+++++++++++ <br> Demo Finish<br> **********+++++++++++ <br> <br>";
?>
|