How to Code ACCESS 2022 | Browsers | Css | Htacess | Html | Html5 | Javascript | Microsoft Excel | Mysql | Mysql Dumps | Php | Vb.net | VBscript | Windows <=8 | Windows >=10 | WP | WP Plugin | WP Themes | _Misc Software | ABCDEFGHIJKLMNOPQRSTUVWXYZONPRTOFF codeid operationid title keywords application code languageid show_html show_iframe make_public viewed viewed_date language operation <- Look Inside DataConditions:Order: 1|2|50 Language Operation Title Keywords Application Code Languageid Show Html Show Iframe Make Public Viewed Viewed Date Php Archive Software Web Activation.php reg75 Reg75.php dbsql($sql); $row=$qu->data1; $device_name=isset($row['device_name'])?$row['device_name']:''; $device_name=$device_name; $lock_device=isset($row['lock_device'])?$row['lock_device']:0; $lock_device_=$lock_device; if($_COOKIE["machine_id"]=="")setcookie("machine_id",$device_name,time()+60*60*24*700 ,"/","softwarewebdesign.com"); for($i=1;$i<=7;$i++){ switch($i){ case 1: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_accounting'; break; case 2: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_accountingP';break; case 3: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_cropMap';break; case 4: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_hairShoppe';break; case 5: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_emailAccts';break; case 6: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_invoices';break; case 7: $server='localhost';$user='softwax3_Steve99';$password='pay99.bill';$database='softwax3_Tips';break; default: } //MAKE SURE USER IS IN THE APPLICATIONS ADMIN DATABASE $connection = mysqli_connect($server, $user,$password); mysqli_select_db($connection, $database); //$db = mysql_pconnect($server, $user,$password); mysql_select_db($database); $qu=new mysqli_swd(); $sql="SELECT * FROM useradmin WHERE lastname='$device_name'";$qu->dbsql($sql); if($qu->num==0){ $sql="INSERT INTO `useradmin`(`userid`, `lastname`, `firstname`, `email`, `username`, `password`, `level`, `logintimes`, `lastlogin`, `accesspages`, `ipaddress`, `locked`) VALUES (NULL,'$device_name','fnmae','email1','uname','[passvalue-6]',10,10,'','[value-11]','[value-12]',$lock_device)";$qu->dbsql($sql); } else { $sql="UPDATE `useradmin` SET `lastname`='$device_name',`locked`= $lock_device WHERE lastname='$device_name'"; $qu->dbsql($sql); } } } if($_GET["EM"]==1){ setcookie("machine_id","INACTIVE",time()+60*60*24*700 ,"/","softwarewebdesign.com");header("location:index75.php");exit; } $ID=$_GET["ID"];if($ID=="")$ID=0; $FORM=$_REQUEST['FORM']; $user='softwax3_build99';$password='Web2Build.now';$database='softwax3_SoftwareUsers';// swd 10/23/19 $connection = mysqli_connect($server, $user,$password); mysqli_select_db($connection, $database);// swd 10/23/19 if($FORM==2){ setcookie("machine_id",$_GET["DEVICE"],time()+60*60*24*700 ,"/","softwarewebdesign.com"); header("location:index75.php"); exit; } if($FORM==""){ $FORM=0;$caption99="NEW"; } $appid="1975"; $PID=$_GET['PID']; if($PID>0){ UpdateDbases($PID); header("location:reg75.php"); exit; } //LOAD MASTER USERS DATABASE $qu=new mysqli_swd();$sql="SELECT * FROM users ORDER BY device_name";$qu->dbsql($sql); $result=$qu->data; $varVerify="admin31/usersVerify.php"; $varView="/reg75.php"; ?> users View Not Found The requested URL /reg75.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache Server at www.softwarewebdesign.com Port 443 Current Users UseridDevice NameDevice TypeLock Device"; for($i=1;$i<=$qu->num;$i++){ //echo $qu->num; $row=$qu->dbRow($result); $userid=isset($row['userid'])?$row['userid']:''; $userid_=$userid; $device_name=isset($row['device_name'])?$row['device_name']:''; $device_name=$device_name; $device_name_=$device_name; $device_type=isset($row['device_type'])?$row['device_type']:''; $device_type_=$device_type; $lock_device=isset($row['lock_device'])?$row['lock_device']:''; $lock_device_=$lock_device; echo" $device_name$device_type"; if($class=='')$class='class=alt'; else $class=''; //if($LEVEL>8)$dis.=""; } echo ""; //if($NUM>$maxrec && $report=='') echo CreateLinks($INX,$NUM,$maxrec); // `End Report` /* if(strpos($_SERVER["SERVER_NAME"],"ww.")!=1 || $_SERVER["HTTPS"]!="on") { header("location:https://www.softwarewebdesign.com/reg75.php"); exit; } setcookie("user_id","GreatOne",time()+60*60*24*700 ,"/","softwarewebdesign.com"); setcookie("password_id","Agriculture",time()+60*60*24*700 ,"/","softwarewebdesign.com"); //if($_POST["machine"]!="")setcookie("machine_id",$_POST["machine"],time()+60*60*24*700 ,"/","softwarewebdesign.com"); header("location:https://www.softwarewebdesign.com/index75.php"); */ $sql="SELECT * FROM users WHERE userid=$ID";$qu->dbsql($sql); $row=$qu->data1; if($qu->num>0)$caption99="Update"; $userid=isset($row['userid'])?$row['userid']:0; $userid_=$userid; $device_name=isset($row['device_name'])?$row['device_name']:''; $device_name=$device_name; $device_name_=$device_name; $device_type=isset($row['device_type'])?$row['device_type']:0; $device_type_=$device_type; $lock_device=isset($row['lock_device'])?$row['lock_device']:0; $lock_device_=$lock_device; ?> Form Users Form Device Name: Device type> Smart Phone > Tablet > Laptop > Desktop Lock Device: > Php 4 05/05/2026 Php Archive Color Change Script color convert javascript step Home Page div {float:left;} ---------------- ---------------- -------------------- ---Test---- R: G: B: Try it yourself: R: G: B:Transfer RGB Color Values Color Hex Code Color Hex Code Color Hex Code Alice blue #F0F8FF Antique white #FAEBD7 Aqua #00FFFF Aquamarine #7FFFD4 Azure #F0FFFF Beige #F5F5DC Bisque #FFE4C4 Black #000000 Blanche dalmond #FFEBCD Blue #0000FF Blue violet #8A2BE2 Brown #A52A2A Burlywood #DEB887 Cadet blue #5F9EA0 Chartreuse #7FFF00 Chocolate #D2691E Coral #FF7F50 Cornflower blue #6495ED Cornsilk #FFF8DC Crimson #DC143C Cyan #00FFFF Dark blue #00008B Dark cyan #008B8B Dark goldenrod #B8860B Dark gray #A9A9A9 Dark green #006400 Dark khaki #BDB76B Dark magenta #8B008B Dark olive green #556B2F Dark orange #FF8C00 Dark orchid #9932CC Dark red #8B0000 Dark salmon #E9967A Dark seagreen #8DBC8F Dark slate blue #483D8B Dark slate gray #2F4F4F Dark turquoise #00DED1 Dark violet #9400D3 Deep pink #FF1493 Deep sky blue #00BFFF Dim gray #696969 Dodger blue #1E90FF Firebrick #B22222 Floral white #FFFAF0 Forest green #228B22 Fuchsia #FF00FF Gainsboro #DCDCDC Ghost white #F8F8FF Gold #FFD700 Goldenrod #DAA520 Gray #808080 Green #008000 Green yellow #ADFF2F Honeydew #F0FFF0 Hot pink #FF69B4 Indian red #CD5C5C Indigo #4B0082 Ivory #FFFFF0 Khaki #F0E68C Lavender #E6E6FA Lavender blush #FFF0F5 Lawngreen #7CFC00 Lemon chiffon #FFFACD Light blue #ADD8E6 Light coral #F08080 Light cyan #E0FFFF Light goldenrod yellow #FAFAD2 Light green #90EE90 Light grey #D3D3D3 Light pink #FFB6C1 Light salmon #FFA07A Light seagreen #20B2AA Light sky blue #87CEFA Light slate gray #778899 Light steel blue #B0C4DE Light yellow #FFFFE0 Lime #00FF00 Lime green #32CD32 Linen #FAF0E6 Magenta #FF00FF Maroon #800000 Medium aquamarine #66CDAA Medium blue #0000CD Medium orchid #BA55D3 Medium purple #9370DB Medium sea green #3CB371 Medium slate blue #7B68EE Medium spring green #00FA9A Medium turquoise #48D1CC Medium violet red #C71585 Midnight blue #191970 Mint cream #F5FFFA Misty rose #FFE4E1 Moccasin #FFE4B5 Navajo white #FFDEAD Navy #000080 Old lace #FDF5E6 Olive drab #6B8E23 Orange #FFA500 Orange red #FF4500 Orchid #DA70D6 Pale goldenrod #EEE8AA Pale green #98FB98 Pale turquoise #AFEEEE Pale violet red #DB7093 Papaya whip #FFEFD5 Peach puff #FFDAB9 Peru #CD853F Pink #FFC8CB Plum #DDA0DD Powder blue #B0E0E6 Purple #800080 Red #FF0000 Rosy brown #BC8F8F Royal blue #4169E1 Saddle brown #8B4513 Salmon #FA8072 Sandy brown #F4A460 Sea green #2E8B57 Sea shell #FFF5EE Sienna #A0522D Silver #C0C0C0 Sky blue #87CEEB Slate blue #6A5ACD Snow #FFFAFA Spring green #00FF7F Steelblue #4682B4 Tan #D2B48C Teal #008080 Thistle #D8BFD8 Tomato #FF6347 Turquoise #40E0D0 Violet #EE82EE Wheat #F5DEB3 White #FFFFFF Whitesmoke #F5F5F5 Yellow #FFFF00 Yellow green #9ACD32 "; Php 9 05/05/2026 Php Archive Hempdbase Code Saved hemp potency importPDF 0)return 0; if($numberFront>0){$length=strlen($numberFront); $value =substr($value,$length,strlen($value)-$length)." ".$numberFront;} $length=strrpos($value," ");$value=(float)substr($value,$length, strlen($value)-length);//echo "value=$value"; //echo $value.""; return $value; } function singleLine($search,$lineIndex,$extractBy){ // lineIndex IS FOR DATA NOT ON THE SAME LINE SET=0 MOSTLY global $exported; $tmp=array(); $actualValue="";$tmp[0]="empty"; $tmp[1]=0; $found_it=false; global $kIndex;// FOR OLDER VERSIONS foreach($exported as $k=>$value) { //if($k<$kIndex){ continue; } //prevent duplicates assuming data sequential read //echo "value=".$value; if(strpos($value,$search)>0){ $kIndex=$k; $found_it=true; break; } // record Located } $actualValue=$exported[$k+$lineIndex]; //if(strpos($actualValue,$extractBy)==0 || $extractBy=="" ){ $tmp[0]="empty"; $tmp[1]=$actualValue; echo "shit happened"; return $tmp; } $tmp=explode($extractBy,$actualValue); //print_r($tmp); if($found_it==false){ $tmp[0]=$actualValue; $tmp[1]="shit"; echo $search."=SHIT HAPPENED 2"; } //$tmp[0]."=".$tmp[1]."" echo $actualValue."====".$tmp[0]." 1-".$tmp[1]." 2-".$tmp[2]." 3-".$tmp[3].""; return $tmp; } $kIndex=-1; include("header.php"); ?> Potency Profile IMPORTER 2023/01/01->2023/12/31 2024/01/01->2024/12/31 2025/01/01->2025/12/31 2026/01/01->2026/12/31 dbsql($sql); //get default batch name LOOK IS settingsView.php $sql="SELECT sampleid FROM process WHERE sample = '".$qu->data1[0]."'"; $qu->dbsql($sql); // get sampleid prom the process table $sampleid=$qu->data1[0]; $laboratoryid=1;$analysis_methodid="HPLC"; $export=$_POST["importstring"];$lookUp=array(); //read imported data step I $daterange=$_POST["daterange"]; // DETERMINES THE VERSION OF THE PDF WHICH CHANGE IN TIME switch ($daterange){ //CLEAN UP SPACES IN POTENCY NAMES case "9": $export=str_replace("Max Active Cannabidiol (CBD)","Max_Active_Cannabidiol_(CBD)",$export); $export=str_replace("Cannabichromene (CBC)","Cannabichromene_(CBC)",$export); $export=str_replace("Cannabidiol (CBD)","Cannabidiol_(CBD)",$export); $export=str_replace("Cannabidiolic Acid (CBD-A)","Cannabidiolic_Acid_(CBD-A)",$export); $export=str_replace("Cannabidivarin (CBDV)","Cannabidivarin_(CBDV)",$export); $export=str_replace("Cannabigerol (CBG)","Cannabigerol_(CBG)",$export); $export=str_replace("Cannabigerolic Acid (CBG-A)","Cannabigerolic_Acid_(CBG-A)",$export); $export=str_replace("Cannabinol (CBN)","Cannabinol_(CBN)",$export); $export=str_replace("delta 8-Tetrahydrocannabinol","delta_8-Tetrahydrocannabinol",$export); $export=str_replace("delta-9-Tetrahydrocannabinolic Acid (THC-A)","delta-9-Tetrahydrocannabinolic_Acid(THC-A)",$export); $export=str_replace("delta 9-Tetrahydrocannabinol (THC)","delta_9-Tetrahydrocannabinol_(THC)",$export); $export=str_replace("Tetrahydrocannabivarin (THCV)","Tetrahydrocannabivarin_(THCV)",$export); $export=str_replace("Max Active THC (delta-9-tetrahydrocannabinol)","Max_Active_THC(delta-9-tetrahydrocannabinol)",$export); $export=str_replace("Total Cannabinoids","Total_Cannabinoids",$export); break; default: if(strpos($export,"(6aR,9S)")==0){$export=str_replace("Cannabinoids Total","(6aR,9S)-delta-10-THC <0.30 (6aR,9R)-delta-10-THC <0.30 Cannabinoids Total",$export); } // THIS LINES ARE ADDED BECAUSE WE HAVE THESE FIELDS IN OUR DATABASE COULD BE PROBLEM LATER //END SETUP OF IMPORTED STRING } $l=str_replace(chr(13),"",$export); echo "$l"; $exported=explode(chr(13).chr(10),$export); //print_r($exported);exit; //[0] => Customer: [1] => Sample ID: [2] => Labnumber: [3] => Club LLC [4] => A - 3R Muscle Rub Roll-on - Batch AN-114 //$lookUp=singleLine("abnumber:",1,""); $submitter_name= trim($lookUp[1]); $lookUp=singleLine("abnumber:",2,""); $sample_desc= trim($lookUp[1]); //SWD switch ($dateCode) { case "9": //ALL DONE IN LOAD LAB INFORMATION break; default: $submitter_name= loadSubmitter($daterange); $sample_desc= loadSampleDescription($daterange); } //[5] => Address: [6] => TopicalMatrix: [7] => 24D0020-01 //[8] => 1312 Blue Spruce Drive, Unit 2 [9] => Fort Collins, CO 80524 [10] => Extraction [11] => Date(s) [12] => Analysis [13] => Date(s) //[14] => 4/4/2024 4/4/2024 [15] => Extraction Technician: CB loadLabInformation($daterange); //Header info for FORM $kIndex=loadAnalysisStart($daterange); $kIndex=loadAnalysisEnd($daterange,$max_active_THC, $max_active_CDB, $total_active_cannabinoids, $total_cannabinoids,$density);//echo "cdv===".$CBDV;exit; $tmp[0]=$max_active_CDB/$max_active_THC;$tmp[0]=number_format ($tmp[0], 2).":1"; $tmp[1]=$max_active_THC/$max_active_CDB;$tmp[1]=number_format ($tmp[1], 2).":1"; $CBD_THC_ratio=$tmp[0]; $THC_CBD_ratio=$tmp[1]; $converted=0; $extension=""; $pdf=""; $process=0;$comment=null; ?> ``` Php 0 06/04/2026 Php Archive Backup Of Model Filter List view2 model filter Filter List By Model "; $fp = fopen("index.php", "w"); fwrite($fp, $txt); fclose($fp); } $LEVEL=3; function retrieveSettings($appid){ $bkup=array(); $savedSessions= json_decode(stripslashes($_COOKIE["SESSIONARRAY".$appid])); $savedPosts= json_decode(stripslashes($_COOKIE["POSTARRAY".$appid])); $savedGets= json_decode(stripslashes($_COOKIE["GETARRAY".$appid])); if(gettype($savedSessions)=='array' || gettype($savedSessions)=='object'){ foreach($savedSessions as $k=>$value) { if($value!="")$bkup[$k]=$value; } } if(gettype($savedPosts)=='array' || gettype($savedPosts)=='object'){ foreach($savedPosts as $k=>$value) { if($value!="")$bkup[$k]=$value; } } if(gettype($savedGets)=='array' || gettype($savedGets)=='object'){ foreach($savedGets as $k=>$value) { if($value!="")$bkup[$k]=$value; } } return $bkup; } function checkValue($value1,$value2){ if($value1=="")$value1=$value2; return $value1; } function comboResultSet($fieldidx,$fieldx,$tablex){ global $r; $settings=array(); $WHERE=""; if(function_exists("createConditions")){ $settings=createConditions($tablex); if($settings[0]!="" )$WHERE=$settings[0]; if($settings[1]!="" )$fieldx=$settings[1]; } $sql="SELECT $fieldidx,$fieldx FROM $tablex $WHERE ORDER BY $fieldx";$r->dbsql($sql); return $r->data; } function comboResultSet2($tablex,$fieldidx,$valuex){ global $r; $sql="SELECT * FROM $tablex WHERE $fieldidx = '$valuex'";$r->dbsql($sql); return $r->data1; } function reportArray($result,$fieldxid,$fieldx){ global $r; mysqli_data_seek($result,0); For ($i=0; $i< mysqli_num_rows($result); $i++){ $row=$r->dbRow($result); $xid=replacepunctuation($row["$fieldxid"]); $x=replacepunctuation($row["$fieldx"]); $createdArray[$xid]=$x; } return $createdArray; } function reportArray2($fieldx){ $rowtemp=explode(",",$fieldx[2]); $row=array(); foreach($rowtemp as $k=>$value) { $row[$value]=$value; } return $row; } function reportCombo($result,$fieldxid,$fieldx,$selectx){ global $r; mysqli_data_seek($result,0); For ($i=0; $i< mysqli_num_rows($result); $i++){ $row=$r->dbRow($result); $xid=replacepunctuation($row["$fieldxid"]); $x=replacepunctuation($row["$fieldx"]); if ($xid == $selectx){ $dis1 .= "$xn"; } else{ $dis1 .= "$xn"; } } return $dis1; } function reportCombo2($result,$selectx){ foreach($result as $k=>$value) { $tmp="";if ($value == $selectx){ $tmp="selected"; } $dis1 .= "$valuen"; } return $dis1; } function reportArrayToCombo($result,$selectx){ foreach($result as $k=>$value) { if ($k == $selectx){ $dis1 .= "$valuen"; } else{ $dis1 .= "$valuen"; } } return $dis1; } function CreateLinks($inx,$num,$range){ global $ALPHA; global $VIEW;global $txWhere; $ratio=(int)($num/$range);$start=1;$maxlinks=30; if($ratio<$num/$range)$ratio+=1; $end=$ratio; if($ratio>$maxlinks){ $start=$inx/$range-$maxlinks/2; if($start<1)$start=1; $end=$start+$maxlinks; if($end>$ratio){ $end=$ratio;$start=$end-$maxlinks; } } for($i=$start;$i<=$end;$i++){ switch($VIEW){ case 2: $submenu.="$i|"; break; default: $submenu.="$i|"; } } $dis1.=$submenu; return $dis1; } // `Report Functions` // lOCATION PrintHtml VB.NET ========== //Startup Config View //encryption requires define('SWD_KEY', 'MyKeyHere'); for all modules if(defined('SWD_AUTHENTICATE')!=true){ echo "We do not recognize this device!"; exit; } if (!defined('SWD_KEY')) { define('SWD_KEY', 'KingOfKings'); } define('ICONS','./'); define('WPWD',null); define('FOLDERS',null); $r=new mysqli_swd();$TABLENAME="eqMaintenance";$REPORT_builder='';$prn='';$bodyAppend=''; $varForm="eqMaintenanceForm.php"; $varView=$_SERVER['PHP_SELF']; $resultequipmentid=comboResultSet("equipmentid","model","equipment"); $arrayequipmentid= reportArray($resultequipmentid,"equipmentid","model"); $arraytypeof["A"]="Air"; $arraytypeof["C"]="Coolant"; $arraytypeof["F"]="Fuel"; $arraytypeof["G"]="Grease"; $arraytypeof["H"]="Hydraulic"; $arraytypeof["O"]="Oil"; $arraytypeof["W"]="Water"; $arraytypeof["M"]="Misc"; $arraytypeof["K"]="Check"; $ciphering = "AES-128-CTR";$iv_length = openssl_cipher_iv_length($ciphering);$options_key = 0;$encryption_iv = '1234567891011121'; //SWD $decryption_key = SWD_KEY;$decryption_iv = '1234567891011121'; $ALL=''; $dis1='';$tables='';$dis=''; $dis1='';$query='';$PID='';$class='';$customGets='';$bkup=array(); $last_model=""; $maintenanceid=''; $equipmentid=''; $typeof=''; $filter_number=''; $capacity=''; $plug_size=''; $comments=''; $filter_options='';// ============ lOCATION PrintHtml VB.NET ====================== $_POST['value']=isset($_POST['value']) ? $_POST['value'] : ''; $_GET['RESET']=isset($_GET['RESET']) ? $_GET['RESET'] : ''; $_GET['prn']=isset($_GET['prn'])?$_GET['prn']:''; $_GET['BACK']=isset($_GET['BACK'])?$_GET['BACK']:''; $_POST['inside_search']=isset($_POST['inside_search'])?$_POST['inside_search']:''; $_GET['URL']=isset($_GET['URL'])?$_GET['URL']:''; $_POST['BUTTON']=isset($_POST['BUTTON'])?$_POST['BUTTON']:''; $_POST['SEARCH']=isset($_POST['SEARCH'])?$_POST['SEARCH']:''; $_POST['updaterecord']=isset($_POST['updaterecord'])?$_POST['updaterecord']:''; $_REQUEST['txWhere']=isset($_REQUEST['txWhere'])?$_REQUEST['txWhere']:''; $_REQUEST['txOrderby']=isset($_REQUEST['txOrderby'])?$_REQUEST['txOrderby']:''; $ALL=isset($_GET['ALL'])?$_GET['ALL']:''; $_GET['MULTINPUT']=isset($_GET['MULTINPUT'])?$_GET['MULTINPUT']:''; $_GET['PDS_']=isset($_GET['PDS_'])?$_GET['PDS_']:''; $_GET['PDS_KILL']=isset($_GET['PDS_KILL'])?$_GET['PDS_KILL']:''; $_GET['INX']=isset($_GET['INX'])?$_GET['INX']:''; $_GET['VIEW']=isset($_GET['VIEW'])?$_GET['VIEW']:''; $_GET['NUM']=isset($_GET['NUM'])?$_GET['NUM']:''; $_GET['ALPHA']=isset($_GET['ALPHA'])?$_GET['ALPHA']:''; $_GET['SB']=isset($_GET['SB'])?$_GET['SB']:''; $_GET['report']=isset($_GET['report'])?$_GET['report']:''; $part['query']=isset($part['query'])?$part['query']:''; $part['fragment']=isset($part['fragment'])?$part['fragment']:''; if($_GET["prn"]!="")$prn=$_GET["prn"]; $_SESSION['INSIDE']=isset($_SESSION['INSIDE'])?$_SESSION['INSIDE']:''; $_SESSION['MULTINPUT']=isset($_SESSION['MULTINPUT'])?$_SESSION['MULTINPUT']:''; $_SESSION['MULIUPDATEFIELD']=isset($_SESSION['MULIUPDATEFIELD'])?$_SESSION['MULIUPDATEFIELD']:''; $_SESSION['TABLENAME']=isset($_SESSION['TABLENAME']) ? $_SESSION['TABLENAME'] : ''; $_SESSION['PDS_SAVE']=isset($_SESSION['PDS_SAVE'])?$_SESSION['PDS_SAVE']:''; $_SESSION['SORTBY']=isset($_SESSION['SORTBY'])?$_SESSION['SORTBY']:''; $_SESSION['FIELDSAVE']=isset($_SESSION['FIELDSAVE'])?$_SESSION['FIELDSAVE']:''; $_SESSION['SEARCHSAVE']=isset($_SESSION['SEARCHSAVE'])?$_SESSION['SEARCHSAVE']:''; $_SESSION['URLSAVE']=isset($_SESSION['URLSAVE'])?$_SESSION['URLSAVE']:''; $_POST["BKPOST"]="true";$_GET["BKGET"]="true";$_SESSION["BKSESS"]="TRUE"; $bkup=retrieveSettings($appid); $FID2=$_GET["FID2"]; $ALPHA=$_GET['ALPHA']; if($ALPHA!=''){ $_SESSION['ALPHA_SAVE']=$ALPHA; } ELSE $ALPHA=$_SESSION['ALPHA_SAVE']; $PDS_=$_GET['PDS_']; if($PDS_!=''){ $_SESSION['PDS_SAVE']=$PDS_; } ELSE $PDS_=$_SESSION['PDS_SAVE']; $txWhere=$_REQUEST["txWhere"]; $txOrderby=$_REQUEST["txOrderby"]; if($_POST["SEARCH"]!=""){$_SESSION['ALPHA_SAVE']="";$ALPHA="";} // `Update System Variables` $CLEAR=$_GET["CLEAR"]; //FLUSH EXIT TABLE COOKIES if($CLEAR!=""){ unset($_COOKIE['SESSIONARRAY'.$CLEAR]);setcookie('SESSIONARRAY'.$CLEAR,null,-1,'/'); unset($_COOKIE['POSTARRAY'.$CLEAR]);setcookie('POSTARRAY'.$CLEAR,null,-1,'/'); unset($_COOKIE['GETARRAY'.$CLEAR]);setcookie('GETARRAY'.$CLEAR,null,-1,'/'); $_GET["CLEAR"]=""; } if($_GET["BACK"]==1 || $_GET["BACK"]==2) { $_GET["txWhere"]=$_POST["txWhere"]=$txWhere=$bkup["txWhere"]; $_GET["txOrderby"]=$_POST["txOrderby"]=$txOrderby=$bkup["txOrderby"]; $_SESSION["FIELDSAVE1"]=="eqMaintenance.typeof";$_SESSION["FIELDSAVE2"]=="eqMaintenance.filter_options"; $ALPHA=$bkup['ALPHA_SAVE']; if($ALPHA!=''){ $_SESSION['ALPHA_SAVE']=$ALPHA; } $PDS_=$bkup['PDS_SAVE']; if($PDS_!=''){ $_SESSION['PDS_SAVE']=$PDS_; }else{$_SESSION['PDS_SAVE']=$PDS_;} if($_GET["BACK"]==2 && $FID2==null)$FID2=$_SESSION["FIELDSAVE2"]; //NEEDED FOR LOWER UPDATE $savedSessions=array();$savedRequests=array(); $savedSessions= json_decode(stripslashes($_COOKIE["SESSIONARRAY".$appid])); $savedPosts= json_decode(stripslashes($_COOKIE["POSTARRAY".$appid])); $savedGets= json_decode(stripslashes($_COOKIE["GETARRAY".$appid])); if(gettype($savedSessions)=='array' || gettype($savedSessions)=='object'){ foreach($savedSessions as $k=>$value) { $_SESSION[$k]=$value; } } if(gettype($savedPosts)=='array' || gettype($savedPosts)=='object'){ foreach($savedPosts as $k=>$value) { $_POST[$k]=$value; } } if(gettype($savedGets)=='array' || gettype($savedGets)=='object'){ foreach($savedGets as $k=>$value) { $_GET[$k]=$value; } } //CHECK CURRENT APPLICATION } $json = json_encode($_SESSION);setcookie('SESSIONARRAY'.$appid,$json, time()+3600,"/"); $json = json_encode($_POST);setcookie('POSTARRAY'.$appid,$json,time()+3600,"/"); $json = json_encode($_GET);setcookie('GETARRAY'.$appid,$json,time()+3600,"/"); if($_GET["BACK"]==2)$_SESSION["FIELDSAVE2"]=$FID2; // $r=new mysqli_swd();$REPORT_builder=''; if(file_exists("header_global.php")) require_once("header_global.php"); require_once("eqMaintenance_header.php"); //VB.NET END LOCATION PrintHtml = START VB.NET phpCreateReport function if(file_exists("footnotes.php")&& $prn==""){ include("footnotes.php"); //REMOVE WP PLUGIN [Locate CreateMenu(ByVal N%)] } //WP PLUGIN END REMOVE SECTION $sessionListSave='@'.$sessionListSave; if($_GET["RESET"]==1){ foreach($_SESSION as $k=>$value_) { if($k!="LEVEL"&& strpos($sessionListSave,$k)==0)unset($_SESSION[$k]); } $PDS_=$_GET['PDS_']; if($PDS_!=''){ $_SESSION['PDS_SAVE']=$PDS_; } $ALPHA=null; } $defaultSearchField="eqMaintenance.typeof"; $defaultUpdateField="eqMaintenance.filter_options"; $buttonToChild="VIEW"; $_SESSION["TABLENAME"]="eqMaintenance"; $INX=$_GET["INX"];$NUM=$_GET["NUM"];$VIEW=$_GET["VIEW"];$SB="`".$_GET["SB"]."`";$report=$_GET["report"]; $actual_link = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $part=parse_url($actual_link); $passVariable=$part["query"]; if($part["fragment"]!="")$passVariable.="#".$part["fragment"]; $MULTINPUT=$_GET["MULTINPUT"];if($MULTINPUT!='')$_SESSION['MULTINPUT']=$MULTINPUT; else $MULTINPUT=$_SESSION['MULTINPUT'];if($MULTINPUT==''||$MULTINPUT>1)$MULTINPUT=0; $BUTTON=$_POST['BUTTON'];$search1=$_POST["SEARCH"];$FID1=$_POST["updaterecord1"]; if($BUTTON=="SEARCH" && $_GET["inside_search"]=="")$_SESSION['INSIDE']="off"; $_POST['filter']=isset($_POST['filter'])?$_POST['filter']:'';$filter=$_POST['filter']; //WP plugin if($_POST["filter"]=="*")$search1="*"; if($_POST["filter"]=="**")$search1="**"; // `Start Report` /* $r->dbsql("SELECT filterid,filter FROM filters ORDER BY filterid"); //swd filter disable $result=$r->data; for($i=1;$i<=$r->num;$i++){ $row=$r->dbRow($result); $fil[$row[0]]="$row[1]"; } $hr1[0]="Mile"; $hr1[1]="Hour";$hr1[2]="Days"; if($txWhere=="")$txWhere="CURDATE()>pause_until"; */ if($txWhere=="")$txWhere="filter_number>0 AND equipment.insurance=0"; // END ##Start Report## if($_SESSION["FIELDSAVE1"]=="")$_SESSION["FIELDSAVE1"]=$defaultSearchField; if($FID1==""){ $FID1=$_SESSION["FIELDSAVE1"]; } else $_SESSION["FIELDSAVE1"]=$FID1; if($_SESSION["FIELDSAVE2"]=="")$_SESSION["FIELDSAVE2"]=$defaultUpdateField; if($FID2==""){ $FID2=$_SESSION["FIELDSAVE2"]; } else $_SESSION["FIELDSAVE2"]=$FID2; if($search1=="*" || $search1=="**"){ $_SESSION["SEARCHSAVE"]=""; if($search1=="**"){ $_SESSION['PDS_SAVE']="";$PDS_=""; } $search1="";$_SESSION['ALPHA_SAVE']="";$ALPHA=""; } if($search1==""){ $search1=$_SESSION["SEARCHSAVE"]; } else{ $INX="";$_SESSION["SEARCHSAVE"]=$search1; } if($_POST["inside_search"]=="on" || $_SESSION['INSIDE']=='on'){ $_SESSION['INSIDE']='on';$checked1='checked';$anywhere='%'; } // `Report Before Search` if($prn=="" || $prn=="wp"){ for($i=65;$i<=90;++$i){ $dis1.="".chr($i).""; } $REPORT_builder.= $dis1; // ** END ALPHA CHOICE ** $REPORT_builder.=""; $dis1=''; $REPORT_builder.=""; $dis1.="Typeof:"; $SELECTED='';if($search1=='A' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Air"; $SELECTED='';if($search1=='C' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Coolant"; $SELECTED='';if($search1=='F' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Fuel"; $SELECTED='';if($search1=='G' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Grease"; $SELECTED='';if($search1=='H' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Hydraulic"; $SELECTED='';if($search1=='O' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Oil"; $SELECTED='';if($search1=='W' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Water"; $SELECTED='';if($search1=='M' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Misc"; $SELECTED='';if($search1=='K' && strpos($FID1,'typeof')>0)$SELECTED='checked'; $dis1 .= "Check"; $dis1 .= ""; $REPORT_builder.="$dis1"; $REPORT_builder.= "ONPRTOFF"; //vb.net comboSearchFields function start $title1="n "; $selectme=array();$ftitle=explode(".",$FID1); $selectme[$ftitle[1]]="selected"; $title1.="maintenanceidn"; $title1.="equipmentidn"; $title1.="typeofn"; $title1.="filter_numbern"; $title1.="capacityn"; $title1.="plug_sizen"; $title1.="commentsn"; $title1.="filter_optionsn"; $title1.="modeln"; $title1.="filtern"; // `Report Search Fields` $title1.="n"; // end vb.net comboSearchFields() $REPORT_builder.=$title1; $REPORT_builder.="<- Look Inside Data!!!"; // `Report Search2` $REPORT_builder.="Conditions:Order: "; // `Report Start Task` $REPORT_builder.="n"; } //Form variables on update $maxrec=1000;if($report==1 || $prn==1)$maxrec=500000; if($MULTINPUT>0){ if($maxrec>50) $maxrec=50; } //php ini limitation max_input_vars 1000 $whereInnerjoin="";$whereCondition="";$whereAlpha="";$whereSearch="";$AND="WHERE "; $table='';$terms=''; $t1="equipment"; $tables.="$t1,"; $terms.="$t1.model,"; $whereInnerjoin.=" $AND equipment.equipmentid=eqMaintenance.equipmentid";$AND=' AND '; $t2="filters"; $tables.="$t2,"; $terms.="$t2.filter,"; $whereInnerjoin.=" $AND filters.filterid=eqMaintenance.filterid";$AND=' AND '; $t0="eqMaintenance";$tables.="$t0"; $terms.=" $t0.maintenanceid ,$t0.equipmentid ,$t0.typeof ,$t0.filter_number ,$t0.capacity ,$t0.plug_size ,$t0.comments ,$t0.filter_options"; //CREATE WHERE Conditions JUST BELOW TERMS if($PDS_!='' && $cancel==false){ $whereInnerjoin.=" $AND $t0.equipmentid='$PDS_'";$AND=' AND '; } if($txWhere!="") {$whereCondition=$AND.$txWhere; $AND=" AND ";} if($ALPHA!=""){$whereAlpha="$AND $FID1 LIKE '$ALPHA%'";$AND=" AND ";} if($search1!=''){ $sec1=substr($search1,0,1); if($sec1=="<" || $sec1==">"){ $search1=substr($search1,1,strlen($search1)-1); switch($sec1){ case "<": $whereSearch.=$AND.$FID1." <= '$search1'";$AND=' AND ';break; case ">": $whereSearch.=$AND.$FID1." >= '$search1'";$AND=' AND ';break; } } else { $whereSearch.=$AND.$FID1." LIKE '".$anywhere.$search1."%'"; $AND=' AND '; } } if(function_exists("global_search_filter")){ $whereSearch.=global_search_filter($t0); } // `Report Terms` //if($_GET["RESET"]==1 || $_GET["RESET2"]==1){$terms.=",IF(hour=1,(eqMaintenance.intervalof -(equipment.hours -eqMaintenance.hours)), IF(hour=2,eqMaintenance.intervalof -DATEDIFF(CURDATE(),eqMaintenance.date_done),eqMaintenance.intervalof -(equipment.miles -eqMaintenance.miles))) AS DIFFERENCE"; } if($PDS_!=""){ $sql="SELECT hours,miles,reading_date FROM equipment WHERE equipmentid=$PDS_"; $r->dbsql($sql);$eq_hours=$r->data1[0];$eq_miles=$r->data1[1]; $eq_reading=$r->data1[2]; }else{ $eq_hours=0;$eq_miles=0; $eq_reading=date("m/d/y"); } // END ##Report Terms## $innerjoin="SELECT $terms FROM $tables ".$whereInnerjoin.$whereCondition.$whereAlpha.$whereSearch; // `Sql Where` MODIFY VARIOUS WHERE'S $cancel=false; //CREATE ORDER BY if($SB=="``"){ $SB=$_SESSION["SORTBY"]; }else{ if($_SESSION["SORTBY"]==$SB)$SB=$SB." DESC"; $_SESSION["SORTBY"]=$SB; } $cancel=false; // `Sql Report` 1st Custom Changes to SQL [$t?,$table,$where,$whereAlpha,$whereSearch,$orderby] & Back?RETID= $sort="`model`,`typeof`,`filter_options`"; if($SB=="``" || $SB==""){ if($txOrderby!=""){ $sort=$sort.$txOrderby; if(substr($txOrderby,0,1)!=","){ $sort=$txOrderby; } } //include txtbox order by }else{ $sort=$SB; if($txOrderby!=""){ $sort=$txOrderby; if(substr($txOrderby,0,1)==","){ $sort=$SB.$txOrderby; } } } //Prepare to add multiple column sort. if(gettype($sortColumn)=='array' && strpos($sort,",")==0){ for($ii=1;$ii<=count($sortColumn);$ii++){ if(strpos("|".$sort,stripDESC($sortColumn[$ii]))==0) $sort.=",".$sortColumn[$ii]; } } $orderby=" ORDER BY $sort"; // `Sort Report Header Links` //if($_GET["RESET"]==1 || $_GET["RESET2"]==1 ){ $orderby=" ORDER BY DIFFERENCE"; } // END ##Sort Report Header Links## if($INX=="")$INX=0; $query=$innerjoin.$orderby." LIMIT ".$INX.",".$maxrec; $countrecs="SELECT count(maintenanceid) FROM $tables ".$whereInnerjoin.$whereCondition.$whereAlpha.$whereSearch; $query2=$countrecs; //END DESIGN CODE $r->dbsql($query2);$NUM=$r->data1[0]; $r->dbsql($query);$result=$r->data;$num=$r->num;$query2=$query; if($LEVEL>3)$REPORT_builder.="eqMaintenance on $database sort->$sort"; // `Report Breadcrumbs` if($VIEW=='')$VIEW=0; if($report!=1){ if($prn=="" || $prn=="wp"){ if($NUM>$maxrec) $REPORT_builder.= CreateLinks($INX,$NUM,$maxrec);$dis1=''; // `Report Button Bar` if ($_GET["RESET"]==1)$customGets="&RESET2=1"; // END ##Report Button Bar## if($LEVEL>3) $REPORT_builder.=""; }else{ $REPORT_builder.=""; } } $dis1.=""; $dis1.=""; // == START PRINTING HEADERS OR CHECK FOR DATA REPORT ==== switch($report){ case 1: $fp = fopen("eqMaintenanceReport.csv", "w"); $d="filter,model,maintenanceid,equipmentid,typeof,filter_number,capacity,plug_size,comments,filter_optionsn"; fwrite($fp, $d); break; default: $width=" width=''"; $dis1.=""; if($prn=='') $dis1.="$r->num"; if($prn==''){ $dis1.=""; if($LEVEL>3)$dis1.=""; } $title1=" ModelTypeofFilter Options Filter Number Capacity Plug Size Comments"; // `Report Append Title` use $title1 to customize table headers $dis1.=" $title1"; $REPORT_builder.=$dis1; break; } $cnt=0;$mid=(int)($num/2); // =============== START PRINTING VALUES =========== $pictureExt=".tif,.gif,.jpg,.jpeg,.png"; $movieExt=".swf,.avi,.mp4"; for($i=1;$i<=$num;$i++){ $row=$r->dbRow($result); // `Report Variable Start` $model=ShortenString($row['model']); $filter=ShortenString($row['filter']); $maintenanceid=isset($row['maintenanceid'])?$row['maintenanceid']:''; $maintenanceid_=$maintenanceid; $equipmentid=isset($row['equipmentid'])?$row['equipmentid']:''; $equipmentid_=$equipmentid; $equipmentid=checkValue($arrayequipmentid[$equipmentid],$equipmentid_); if($MULTINPUT==1 && ($prn=='wp' || $prn=='')){ //`MultiInput Format equipmentid` $equipmentid="n"; $equipmentid.=reportCombo($resultequipmentid,"equipmentid","model",$equipmentid_); $equipmentid.="n"; } $typeof=isset($row['typeof'])?$row['typeof']:''; $typeof_=stripslashes($typeof); $typeof=ShortenString($typeof); $typeof=$arraytypeof[$typeof_]; if($MULTINPUT==1 && ($prn=='wp' || $prn=='')){ //`MultiInput Format typeof` $typeof="n"; $typeof.=reportArrayToCombo($arraytypeof,$typeof_); $typeof.="n"; } $filter_number=isset($row['filter_number'])?$row['filter_number']:''; $filter_number_=$filter_number; $capacity=isset($row['capacity'])?$row['capacity']:''; $capacity_=stripslashes($capacity); $capacity=ShortenString($capacity); if($MULTINPUT==1 && ($prn=='wp' || $prn=='')){ $capacity=str_replace(chr(34),""",$capacity); $capacity=str_replace("'","'",$capacity); $capacity="n"; //`MultiInput Format capacity` } $plug_size=isset($row['plug_size'])?$row['plug_size']:''; $plug_size_=stripslashes($plug_size); $plug_size=ShortenString($plug_size); if($MULTINPUT==1 && ($prn=='wp' || $prn=='')){ $plug_size=str_replace(chr(34),""",$plug_size); $plug_size=str_replace("'","'",$plug_size); $plug_size="n"; //`MultiInput Format plug_size` } $comments=isset($row['comments'])?$row['comments']:''; $comments_=stripslashes($comments); $comments=ShortenString($comments); if($MULTINPUT==1 && ($prn=='wp' || $prn=='')){ $comments="n$comments_"; } $filter_options=isset($row['filter_options'])?$row['filter_options']:''; $filter_options_=stripslashes($filter_options); $filter_options=ShortenString($filter_options); // `Report Format` if($last_model!=$model){ $last_model=$model; $model="".$model.""; $class="class=model_change"; } else {if($class=="class=model_change"){$class='';}} // END ##Report Format## if($class=='')$class='class=alt'; else if($class!="class=model_change"){$class='';} switch($report){ case 1: $d=chr(34).$filter.chr(34).",".chr(34).$model.chr(34).",".chr(34).$maintenanceid.chr(34).",".chr(34).$arrayequipmentid[$row['equipmentid']].chr(34).",".chr(34).$typeof.chr(34).",".chr(34).$filter_number.chr(34).",".chr(34).$capacity.chr(34).",".chr(34).$plug_size.chr(34).",".chr(34).$comments.chr(34).",".chr(34).$filter_options.chr(34)."n"; fwrite($fp, $d); break; default: $cnt++;$dis.="n"; if($prn==''){ $dis.=""; if($i==$mid)$dis.=""; } if($prn==''){ if($LEVEL>3){ $dis.=""; if($LEVEL>8){$dis.="";} $dis.=" "; } else $dis.=""; // `Report Left Links` //$dis.=""; // END ##Report Left Links## $dis.=""; } $dis.="$model$typeof $filter_options$filter_number $capacity $plug_size $comments"; //$filter $append1=''; if($MULTINPUT==1 && ($prn=='wp' || $prn=='')){ } // `Report Append Variable` $dis.=$append1.""; //Generate Totals Here break; } } //`End Data Grid` if($report==''){ echo $REPORT_builder.=$dis; if($prn=='' && $LEVEL>5){ echo " Actions Off"; echo ""; echo ""; $query = $r->data; for($ii = 0; $ii < $r->fields; $ii++) { $r->dbTable($query,$ii); $res[$r->fieldname]= $r->fieldlength; } $sql="SHOW TABLES LIKE 'storage%'";$result=mysqli_query($connection,$sql); if (mysqli_num_rows($result) > 0){ $sql="SELECT `value` FROM `storage` WHERE keyword='".$title."Checked'";$storeValue=array(); $result=mysqli_query($connection,$sql); if($result){ $row=mysqli_fetch_array($result,MYSQLI_BOTH); $storeValue=explode(',',$row[0]); for($ii=0;$ii<=count($storeValue)-1;$ii++){ $storeValue[$storeValue[$ii]]="checked"; } }else{ echo "storage undefined"; } } foreach($res as $k=>$value_) { echo "$k"; } // swd end echo ""; echo "Do Nothing Delete Update"; // `Report Option Actions` refers to `Delete Multiple Actions` Add more radio buttons. echo "Sub Report CSV Insert"; if($_SESSION['MULTINPUT']!='1'){ echo "n"; //vb.net comboSearchFields function start $title1="n "; $selectme=array();$ftitle=explode(".",$FID2); $selectme[$ftitle[1]]="selected"; $title1.="maintenanceidn"; $title1.="equipmentidn"; $title1.="typeofn"; $title1.="filter_numbern"; $title1.="capacityn"; $title1.="plug_sizen"; $title1.="commentsn"; $title1.="filter_optionsn"; // `Report Search Fields` $title1.="n"; // end vb.net comboSearchFields() echo "Danger!! You are about ready to destroy $title1 information. Use 'text box' view button if you are required to enter specific values. For experienced users only."; echo "n Old Value: New Value: "; } echo ""; } }else { fclose($fp);echo"Report LinkBe carefull. The linked spreadsheet may not update as data changes.Download the file then reopen spreadsheet to refresh."; echo "";} echo ""; if($NUM>$maxrec && $report=='') echo CreateLinks($INX,$NUM,$maxrec); $urlreturn='equipmentView.php';if($_GET['URL']!='' || $_SESSION['URLSAVE']!=''){ if($_GET['URL']!=''){ $_SESSION['URLSAVE']=$_GET['URL']; } $urlreturn=$_SESSION['URLSAVE']; } echo ""; // `End Report` if($prn==""&& $num>8){ ?> ".number_format(disk_free_space("/")/1024000000,2)."-> Total Gigs ->".number_format(disk_total_space("/")/1024000000,2); $time = microtime();$time = explode(' ', $time);$time = $time[1] + $time[0];$finish = $time;$total_time = round(($finish - $start), 4);echo 'Page generated in '.$total_time.' seconds.'; ?> Compiled version 10.2026.908.0524 Php 0 09/05/2026 Php Archive Code Zoom Backup Code zoom format html_entity_decode Codezoom.php <?php //compiled version: 7.2022.912.1815 $REPORT_builder.="<script> function Clipboard(txt) { var copyText = document.getElementById(txt); copyText.select(); copyText.setSelectionRange(0, 99999); navigator.clipboard.writeText(copyText.value); }</script>"; $pageLevel=3; $title="code View"; // `Startup Config` embed point $appid="638069743707776546";$appidLast=""; error_reporting( error_reporting() & ~E_NOTICE ); require_once("mystuff.php"); require_once("functions.php"); $r=new mysqli_swd(); //if(file_exists("header_global.php")) require_once("header_global.php"); //if(file_exists("header.php")){ include("header.php"); }else{ echo $REPORT_builder; } $codeid=$_GET["PID"]; //$codeid = ereg_replace('[^0-9]', '', $codeid); $sql="SELECT code,viewed,viewed_date,show_html FROM code WHERE codeid = '$codeid'"; $r->dbsql($sql); $code=html_entity_decode(stripslashes($r->data1[0])); $sql="UPDATE `code` SET `viewed`='".($r->data1[1]+1)."',`viewed_date`='".date("Y-m-d")."' WHERE codeid = '$codeid'";$r->dbsql($sql); $REPORT_builder.="<div class='div1'><textarea id='code' name='code' style=min-height:500px;width:100%;>$code</textarea></div> <input type='button' name='keywords_clipboard' style='margin-top:25px;' value='Save Code' onclick="Clipboard('code');"> <input type=button onclick="location.href='codeView.php?BACK=1#$codeid';" value='R E T U R N'> </body></html>"; echo $REPORT_builder; ?> Php 2 05/05/2026 Php Archive My Php Functions Function.php function php $value) { mysql_query($value); } fclose($fp); } //example: $result=mysql_query($query) or create_table($t0); } function sizepicture($picture,$maxwidth,$maxheight){ list($width, $height, $type, $attr) = getimagesize($picture); if($width==0)$width=1;if($height==0)$height=1; $size[2]=$width;$size[3]=$height; $hratio=$height/$maxheight; $wratio=$width/$maxwidth; if ($wratio>$hratio){ $ratio=$width/$height; if($width>$maxwidth){ $height=(int)($maxwidth/$ratio);$width=$maxwidth; } }else{ $ratio=$height/$width; if($height>$maxheight){ $width=(int)($maxheight/$ratio);$height=$maxheight; } } $size[0]=$width;$size[1]=$height; return $size; } function replaceForm($longadd){ $longadd=stripslashes($longadd); $longadd=str_replace(chr(160),chr(32),$longadd); $longadd=str_replace("'","'",$longadd); $longadd=str_replace(chr(34),""",$longadd); return $longadd; } function replacePunctuation($longadd){ $longadd=stripslashes($longadd); $longadd=str_replace(chr(160),chr(32),$longadd); return $longadd; } function radiochecked($var,$item){ if($var==$item) return "checked"; else return ""; } function checkboxchecked($value){ if($value==1) return "checked"; else return ""; } function checkhtml($var){ $var2=strip_tags($var); if($var2!=$var){ echo "Mail Server Crashed";exit; } if(strpos("|".$var,"http:")>0){ echo "Mail Server Crashed";exit; } $var=addslashes($var); return $var; } function stripDESC($var1){ $m=strpos($var1,'DESC'); if($m>0)$var1=substr($var1,0,$m-1); return $var1; } function ShortenString($var1){ global $prn; $var1=stripslashes($var1); $var1=str_replace(chr(160),chr(32),$var1); $var1=str_replace(chr(13),'',$var1); if(strlen($var1)>100 && $prn==''){ // $var1=substr($var1,0,40).'....'; $var1="".$var1.""; } //if($var1=='')$var1=' '; if(strpos($var1,'.location')>0 || strpos($var1,'.href')>0)$var1='spam'; return $var1; } function checkBlanks($value){ if($value!="")return "".$value; else return ""; } function _make_url_clickable_cb($matches) { $ret = ''; $url = $matches[2]; if ( empty($url) ) return $matches[0]; // removed trailing [.,;:] from URL if ( in_array(substr($url, -1), array('.', ',', ';', ':')) === true ) { $ret = substr($url, -1); $url = substr($url, 0, strlen($url)-1); } //return $matches[1] . "$url" . $ret; return $matches[1] . "$url" . $ret; } function _make_web_ftp_clickable_cb($matches) { $ret = ''; $dest = $matches[2]; $dest = 'http://' . $dest; if ( empty($dest) ) return $matches[0]; // removed trailing [,;:] from URL if ( in_array(substr($dest, -1), array('.', ',', ';', ':')) === true ) { $ret = substr($dest, -1); $dest = substr($dest, 0, strlen($dest)-1); } return $matches[1] . "$dest" . $ret; } function _make_email_clickable_cb($matches) { $email = $matches[2] . '@' . $matches[3]; return $matches[1] . "$email"; } function MakeHyperlink($ret) { $ret = ' ' . $ret; // in testing, using arrays here was found to be faster $ret = preg_replace_callback('#([s>])([w]+?://[w\x80-\xff#$%&~/.-;:=,?@[]+]*)#is', '_make_url_clickable_cb', $ret); $ret = preg_replace_callback('#([s>])((www|ftp).[w\x80-\xff#$%&~/.-;:=,?@[]+]*)#is', '_make_web_ftp_clickable_cb', $ret); $ret = preg_replace_callback('#([s>])([.0-9a-z_+-]+)@(([0-9a-z-]+.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret); // this one is not in an array because we need it to run last, for cleanup of accidental links within links $ret = preg_replace("#(]+?>|>))]+?>([^>]+?)#i", "$1$3", $ret); $ret = trim($ret); return $ret; } function convertmdy($date1){ if($date1==""||$date1=="0000-00-00"){ $date1="";return date("m/d/y"); } $new=strtotime($date1); $date1= date('m/d/Y',$new); return $date1; } function convertmdytime($date1){ if($date1==""||$date1=="0000-00-00"){ $date1="";return $date1; } $time=strtotime($date1); $date1= date('m/d/Y H:i:s',$time); return $date1; } function convertdate($date1){ if($date1=="") return date('Y-m-d'); $date1=str_replace("/","|",$date1); $date1=str_replace("-","|",$date1); $time=explode("|",$date1); if(strlen($time[0])==1) $time[0]="0".$time[0]; if(strlen($time[1])==1) $time[1]="0".$time[1]; $new=trim($time[2])."-".$time[0]."-".$time[1]; $date1= date('Y-m-d',strtotime($new)); return $date1; } function convertdatetime($date1){ if($date1=="") return date("Y-m-d H:i:s"); $date1= date('Y-m-d H:i:s',strtotime($date1)); return $date1; } function normalizePunctuation($text) { // Replace obscure / smart punctuation with standard keyboard keys $map = [ '“' => '"', 'â€' => '"', '‘' => "'", '’' => "'", // Smart quotes '–' => '-', '—' => '-', '-' => '-', // Dashes/Hyphens '…' => '...', // Ellipsis ]; $text = strtr($text, $map); // Fallback to transliterate any remaining odd characters return iconv('UTF-8', 'ASCII//TRANSLIT', $text); } function swd_debug_mode($debug) { if ($debug) { error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_PARSE | E_USER_ERROR | E_RECOVERABLE_ERROR ); ini_set('display_startup_errors', '1'); ini_set( 'display_errors', 1 ); //error_reporting( E_ALL ); return true; } else { //error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_PARSE | E_USER_ERROR | E_RECOVERABLE_ERROR ); //error_reporting( E_ALL ); return false; } } ?> Php 0 07/20/2026 Php Archive Make Alpha Customer List customer list alpha href Invoices Project Customer List Invoice Customer List dbsql($sql); $result=$qu->data; for($i=1;$i<=$qu->num;$i++){ $row=$qu->dbRow($result); $alpha=substr($row[1],0,1); if($lastfield!=$alpha){ //$dis.="$defaultField $disTitlen"; echo "$alphannnn"; } $lastfield=$alpha; echo "".$row[1].""; //admin31/invoiceView.php?RESET=1&PDS_=20 } ?> Php 0 07/28/2026 Php Constants Setting The Absolute Path absolute path define constant Library if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); require_once(ABSPATH."mystuff.php"); require_once(ABSPATH."functions.php"); Php 5 05/05/2026 Php Customizing Rename A File In PHP rename file Change File Names rename a file in PHP, use the built-in rename() function. This function takes the old filename/path and the new filename/path as mandatory arguments and returns true on success or false on failure. rename() Function Syntax rename($oldname, $newname, $context); $oldname (Mandatory): Specifies the current name/path of the file or directory. $newname (Mandatory): Specifies the new name/path for the file or directory. $context (Optional): Specifies the behavior of the stream. Php 2 05/05/2026 Php Customizing Convert Words Into A Graphic text graphic image convert $im = imagecreate(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ************************************* The below script would be called with a tag like this from a page: Header("Content-type: image/gif"); if(!isset($s)) $s=11; $size = imagettfbbox($s,0,"/fonts/TIMES.TTF",$text); $dx = abs($size[2]-$size[0]); $dy = abs($size[5]-$size[3]); $xpad=9; $ypad=9; $im = imagecreate($dx+$xpad,$dy+$ypad); $blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF); $black = ImageColorAllocate($im, 0,0,0); $white = ImageColorAllocate($im, 255,255,255); ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black); ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white); ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "/fonts/TIMES.TTF", $text); ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "/fonts/TIMES.TTF", $text); ImageGif($im); ImageDestroy($im); ?> It is very important to realize that you cannot put any HTML tags in this file. There should also not be any spaces or blank lines before or after the and ?> tags. If you are getting a broken image using this script, chances are you have a stray carriage return somewhere outside the PHP tags Php 1862 05/05/2026 Php Customizing Using Strip_tags strip tags html Unwanted Table Breaks To remove specific HTML tags from a string in PHP, you have two primary methods: using the built-in strip_tags() function to specify which tags to keep, or using preg_replace() with regular expressions to remove specific tags. Method 1: Using strip_tags() (Recommended) The strip_tags() function is the safest and most efficient way to handle HTML tag removal in most scenarios. It allows you to define an allowable list of tags to preserve, and all other tags will be stripped. This is a headingThis is a paragraph with bold text and an italic word."; // Specify which tags to keep (e.g., and ) $allowed_tags = ""; $clean_string = strip_tags($html_string, $allowed_tags); echo $clean_string; ?> Output: This is a headingThis is a paragraph with bold text and an italic word. In the above example, and tags are removed, while and tags are retained because they were in the $allowed_tags list. The text content within the removed tags is preserved. Method 2: Using preg_replace() (For advanced, specific removal) If you need to remove a small, specific list of tags and keep all others, or if you need to remove the tags and their contents (like "; ?> dbsql($sql);$result=$r->data;$num=$r->num; if ($num > 0) { while($row = $result->fetch_assoc()) { $res[$row["COLUMN_NAME"]]= $row["CHARACTER_MAXIMUM_LENGTH"]; } } $varVerify="scriptureVerify.php"; $varView="scriptureView.php"; $FORM=$_REQUEST['FORM'];$PID=$_GET['PID'];$INX=$_GET['INX'];$NUM=$_GET['NUM'];$ALPHA=$_GET['ALPHA'];$VIEW=$_GET['VIEW']; $url1=$_REQUEST['url1']; $actual_link = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $part=parse_url($actual_link); $passVariable=$part["query"]; // `Start Form` if($FORM=='')$FORM=0; $ciphering = "AES-128-CTR";$iv_length = openssl_cipher_iv_length($ciphering);$options_key = 0; $decryption_key = SWD_KEY;$decryption_iv = '1234567891011121'; switch($FORM){ Case 0: $caption99='New '; if($SVE==''){ $bookid=''; $chapter=''; $keywords=''; $scripture=''; $folder=''; $scripture2=''; } // `New Form Default` break; default: //Update Form $caption99='+++++++ Update +++++'; $query="SELECT * FROM scripture WHERE scriptureid=$PID"; $r->dbsql($query);$row=$r->data1; //`Form Variable Start` $scriptureid=$row['scriptureid']; $bookid=$row['bookid']; $chapter=$row['chapter']; $keywords=$row['keywords']; $keywords=replaceForm($keywords); $scripture=$row['scripture']; $scripture=replaceForm($scripture); $folder=$row['folder']; $folder=replaceForm($folder); $scripture2=$row['scripture2']; $scripture2=replaceForm($scripture2); break; } echo ""; //Print the Form up $dis1 = "$caption99 Form scripture "; if($FORM==1){ $dis1.=""; } // `Form Add Variables` $dis1.="n"; $dis1.=""; $where_book=""; $orderby="ORDER BY book"; $grouping=false; // `Form Combo Start bookid` section to add code to the txx file here for combo variable $STID=$bookid; $query="SELECT * FROM books $where_book $orderby "; //queryMODbooks $r->dbsql($query);$result=$r->data;$num=$r->num; $dis1.= "Bookid:----------------n"; For ($i=0; $i< $num; $i++){ $row=$r->dbRow($result); $bookid=replacepunctuation($row['bookid']); $book=replacepunctuation($row['book']); // `Form Combo bookid` section to add code to the txx file here for combo alterations if ($bookid == $STID){ $dis1 .= "$bookn"; } else{ $dis1 .= "$bookn"; } } if($grouping==true)$dis1 .= ""; $dis1 .= ""; $dis1.="nChapter: "; $dis1.="nKeywords:".$res["keywords"]." $keywords"; $dis1.="nScripture:".$res["scripture"]." $scripture"; $where_version=""; $orderby="ORDER BY version"; $grouping=false; // `Form Combo Start folder` section to add code to the txx file here for combo variable $STID=$folder; $query="SELECT * FROM versions $where_version $orderby "; //queryMODversions $r->dbsql($query);$result=$r->data;$num=$r->num; $dis1.= "Folder:----------------n"; For ($i=0; $i< $num; $i++){ $row=$r->dbRow($result); $folder=replacepunctuation($row['folder']); $version=replacepunctuation($row['version']); // `Form Combo folder` section to add code to the txx file here for combo alterations if ($folder == $STID){ $dis1 .= "$versionn"; } else{ $dis1 .= "$versionn"; } } if($grouping==true)$dis1 .= ""; $dis1 .= ""; $dis1.="nScripture2:".$res["scripture2"]." $scripture2"; $dis1.="n"; echo $dis1; ?> Php 2 05/05/2026 Php Formatting Physically Resize An Image resize image /* * File: SimpleImage.php * Author: Simon Jarvis * Copyright: 2006 Simon Jarvis * Date: 08/11/06 * Link: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * http://www.gnu.org/licenses/gpl.html * */ class SimpleImage { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($filename); } elseif( $this->image_type == IMAGETYPE_GIF ) { $this->image = imagecreatefromgif($filename); } elseif( $this->image_type == IMAGETYPE_PNG ) { $this->image = imagecreatefrompng($filename); } } function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image,$filename,$compression); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image,$filename); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image,$filename); } if( $permissions != null) { chmod($filename,$permissions); } } function output($image_type=IMAGETYPE_JPEG) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image); } } function getWidth() { return imagesx($this->image); } function getHeight() { return imagesy($this->image); } function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width,$height); } function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getheight() * $ratio; $this->resize($width,$height); } function scale($scale) { $width = $this->getWidth() * $scale/100; $height = $this->getheight() * $scale/100; $this->resize($width,$height); } function resize($width,$height) { $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } } ?> ============ Save the above file as SimpleImage.php and take a look at the following examples of how to use the script. The first example below will load a file named picture.jpg resize it to 250 pixels wide and 400 pixels high and resave it as picture2.jpg include('SimpleImage.php'); $image = new SimpleImage(); $image->load('picture.jpg'); $image->resize(250,400); $image->save('picture2.jpg'); ?> If you want to resize to a specifed width but keep the dimensions ratio the same then the script can work out the required height for you, just use the resizeToWidth function. include('SimpleImage.php'); $image = new SimpleImage(); $image->load('picture.jpg'); $image->resizeToWidth(250); $image->save('picture2.jpg'); ?> You may wish to scale an image to a specified percentage like the following which will resize the image to 50% of its original width and height include('SimpleImage.php'); $image = new SimpleImage(); $image->load('picture.jpg'); $image->scale(50); $image->save('picture2.jpg'); ?> You can of course do more than one thing at once. The following example will create two new images with heights of 200 pixels and 500 pixels include('SimpleImage.php'); $image = new SimpleImage(); $image->load('picture.jpg'); $image->resizeToHeight(500); $image->save('picture2.jpg'); $image->resizeToHeight(200); $image->save('picture3.jpg'); ?> The output function lets you output the image straight to the browser without having to save the file. Its useful for on the fly thumbnail generation header('Content-Type: image/jpeg'); include('SimpleImage.php'); $image = new SimpleImage(); $image->load('picture.jpg'); $image->resizeToWidth(150); $image->output(); ?> The following example will resize and save an image which has been uploaded via a form if( isset($_POST['submit']) ) { include('SimpleImage.php'); $image = new SimpleImage(); $image->load($_FILES['uploaded_image']['tmp_name']); $image->resizeToWidth(150); $image->output(); } else { ?> } ?> Php 1190 05/05/2026 Php Formatting Strip Html Tags strip html Library $text = 'Test paragraph. Other text'; echo strip_tags($text); echo "n"; // Allow and echo strip_tags($text, ''); // as of PHP 7.4.0 the line above can be written as: // echo strip_tags($text, ['p', 'a']); ?> The strip_tags() function strips a string from HTML, XML, and PHP tags. Note: HTML comments are always stripped. This cannot be changed with the allow parameter. Note: This function is binary-safe. Syntax strip_tags(string,allow) Parameter Values Parameter Description string Required. Specifies the string to check allow Optional. Specifies allowable tags. These tags will not be removed Technical Details Return Value: Returns the stripped string Example Strip the string from HTML tags, but allow <b> tags to be used: <?php echo strip_tags("Hello <b><i>world!</i></b>","<b>"); ?> Php 5 05/05/2026 Php Formatting Formating For Numbers number format Ereg Eregi Preg_match Preg Match keywords: ereg eregi preg_match preg match Syntax: preg_replace( $pattern, $replacement, $subject, $limit, $count ) Return Value: This function returns an array if the subject parameter is an array, or a string otherwise. Example: In this example we use preg_replace to remove non-numeric characters from a string, leaving only the numbers. It then prints the extracted numbers from the string. // PHP program to illustrate // preg_replace function // Declare a variable and initialize it $geeks = 'Welcome 2 Geeks 4 Geeks.'; // Filter the Numbers from String $int_var = preg_replace('/[^0-9]/', '', $geeks); // print output of function echo("The numbers are: $int_var n"); ?> Output The numbers are: 24 =========================================== filter_var You can use filter_var and sanitize the string to only include integers. $s = "Lesson 001: Complete"; echo filter_var($s, FILTER_SANITIZE_NUMBER_INT); ========================================== $s = "Lesson 001: Complete"; preg_match("/([0-9]+)/", $s, $matches); echo $matches[1]; ========================================== number_format (1234.567); //Returns the number 1,235 number_format (1234.567, 2); //Returns the number 1,234.57 number_format (1234.567, 2, ',', ' '); //Returns the number 1 234,57 number_format (1234.567, 1, 'a', 'b'); //Returns the number 1b234a6 Php 3 05/05/2026 Php Formatting Remove Fancy Ascii ascii replace delete clean string String Cleanup function clean_keyboard_characters($text) { // 1. Replace Unicode smart/curly quotes and typographical dashes $replacements = [ // Left and right double quotes -> " 'x{201C}' => '"', 'x{201D}' => '"', // Left and right single quotes / apostrophes -> ' 'x{2018}' => "'", 'x{2019}' => "'", // En dash and Em dash -> - 'x{2013}' => '-', 'x{2014}' => '-' ]; foreach ($replacements as $pattern => $replace) { $text = preg_replace('/' . $pattern . '/u', $replace, $text); } // 2. Replace the black diamond question mark (EF BF BD in hex) // Often caused by UTF-8 decoding errors; replaced with a standard dash or space $text = str_replace("xEFxBFxBD", chr(160), $text); return $text; } //scriptureView uses this function Php 2 07/23/2026 Php Formatting Html_entity_decode decode format Restoring Html Saves (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8) html_entity_decode — Convert HTML entities to their corresponding characters Description ¶ html_entity_decode(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, ?string $encoding = null): string html_entity_decode() is the opposite of htmlentities() in that it converts HTML entities in the string to their corresponding characters. More precisely, this function decodes all the entities (including all numeric entities) that a) are necessarily valid for the chosen document type — i.e., for XML, this function does not decode named entities that might be defined in some DTD — and b) whose character or characters are in the coded character set associated with the chosen encoding and are permitted in the chosen document type. All other entities are left as is. Parameters ¶ string The input string. flags A bitmask of one or more of the following flags, which specify how to handle quotes and which document type to use. The default is ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. Available flags constants Constant Name Description ENT_COMPAT Will convert double-quotes and leave single-quotes alone. ENT_QUOTES Will convert both double and single quotes. ENT_NOQUOTES Will leave both double and single quotes unconverted. ENT_SUBSTITUTE Replace invalid code unit sequences with a Unicode Replacement Character U+FFFD (UTF-8) or &#xFFFD; (otherwise) instead of returning an empty string. ENT_HTML401 Handle code as HTML 4.01. ENT_XML1 Handle code as XML 1. ENT_XHTML Handle code as XHTML. ENT_HTML5 Handle code as HTML 5. encoding An optional argument defining the encoding used when converting characters. If omitted, encoding defaults to the value of the default_charset configuration option. Although this argument is technically optional, you are highly encouraged to specify the correct value for your code if the default_charset configuration option may be set incorrectly for the given input. The following character sets are supported: Supported charsets Charset Aliases Description ISO-8859-1 ISO8859-1 Western European, Latin-1. ISO-8859-5 ISO8859-5 Little used cyrillic charset (Latin/Cyrillic). ISO-8859-15 ISO8859-15 Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1 (ISO-8859-1). UTF-8 ASCII compatible multi-byte 8-bit Unicode. cp866 ibm866, 866 DOS-specific Cyrillic charset. cp1251 Windows-1251, win-1251, 1251 Windows-specific Cyrillic charset. cp1252 Windows-1252, 1252 Windows specific charset for Western European. KOI8-R koi8-ru, koi8r Russian. BIG5 950 Traditional Chinese, mainly used in Taiwan. GB2312 936 Simplified Chinese, national standard character set. BIG5-HKSCS Big5 with Hong Kong extensions, Traditional Chinese. Shift_JIS SJIS, SJIS-win, cp932, 932 Japanese EUC-JP EUCJP, eucJP-win Japanese MacRoman Charset that was used by Mac OS. '' An empty string activates detection from script encoding (Zend multibyte), default_charset and current locale (see nl_langinfo() and setlocale()), in this order. Not recommended. Note: Any other character sets are not recognized. The default encoding will be used instead and a warning will be emitted. Return Values ¶ Returns the decoded string. Changelog ¶ Version Description 8.1.0 flags changed from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. 8.0.0 encoding is nullable now. Examples ¶ Example #1 Decoding HTML entities <?php $orig = "I'll "walk" the <b>dog</b> now"; $a = htmlentities($orig); $b = html_entity_decode($a); echo $a; // I'll &quot;walk&quot; the &lt;b&gt;dog&lt;/b&gt; now echo $b; // I'll "walk" the <b>dog</b> now ?> Notes ¶ Php 3 05/05/2026 Php Formatting Htmlentities html convert format Html, Php Saves (PHP 4, PHP 5, PHP 7, PHP 8) htmlentities — Convert all applicable characters to HTML entities Description ¶ htmlentities( string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, ?string $encoding = null, bool $double_encode = true ): string This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities. The get_html_translation_table() function can be used to return the translation table used dependent upon the provided flags constants. If you want to decode instead (the reverse) you can use html_entity_decode(). Parameters ¶ string The input string. flags A bitmask of one or more of the following flags, which specify how to handle quotes, invalid code unit sequences and the used document type. The default is ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. Available flags constants Constant Name Description ENT_COMPAT Will convert double-quotes and leave single-quotes alone. ENT_QUOTES Will convert both double and single quotes. ENT_NOQUOTES Will leave both double and single quotes unconverted. ENT_IGNORE Silently discard invalid code unit sequences instead of returning an empty string. Using this flag is discouraged as it » may have security implications. ENT_SUBSTITUTE Replace invalid code unit sequences with a Unicode Replacement Character U+FFFD (UTF-8) or &#FFFD; (otherwise) instead of returning an empty string. ENT_DISALLOWED Replace invalid code points for the given document type with a Unicode Replacement Character U+FFFD (UTF-8) or &#FFFD; (otherwise) instead of leaving them as is. This may be useful, for instance, to ensure the well-formedness of XML documents with embedded external content. ENT_HTML401 Handle code as HTML 4.01. ENT_XML1 Handle code as XML 1. ENT_XHTML Handle code as XHTML. ENT_HTML5 Handle code as HTML 5. encoding An optional argument defining the encoding used when converting characters. If omitted, encoding defaults to the value of the default_charset configuration option. Although this argument is technically optional, you are highly encouraged to specify the correct value for your code if the default_charset configuration option may be set incorrectly for the given input. The following character sets are supported: Supported charsets Charset Aliases Description ISO-8859-1 ISO8859-1 Western European, Latin-1. ISO-8859-5 ISO8859-5 Little used cyrillic charset (Latin/Cyrillic). ISO-8859-15 ISO8859-15 Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1 (ISO-8859-1). UTF-8 ASCII compatible multi-byte 8-bit Unicode. cp866 ibm866, 866 DOS-specific Cyrillic charset. cp1251 Windows-1251, win-1251, 1251 Windows-specific Cyrillic charset. cp1252 Windows-1252, 1252 Windows specific charset for Western European. KOI8-R koi8-ru, koi8r Russian. BIG5 950 Traditional Chinese, mainly used in Taiwan. GB2312 936 Simplified Chinese, national standard character set. BIG5-HKSCS Big5 with Hong Kong extensions, Traditional Chinese. Shift_JIS SJIS, SJIS-win, cp932, 932 Japanese EUC-JP EUCJP, eucJP-win Japanese MacRoman Charset that was used by Mac OS. '' An empty string activates detection from script encoding (Zend multibyte), default_charset and current locale (see nl_langinfo() and setlocale()), in this order. Not recommended. Note: Any other character sets are not recognized. The default encoding will be used instead and a warning will be emitted. double_encode When double_encode is turned off PHP will not encode existing html entities. The default is to convert everything. Return Values ¶ Returns the encoded string. If the input string contains an invalid code unit sequence within the given encoding an empty string will be returned, unless either the ENT_IGNORE or ENT_SUBSTITUTE flags are set. Changelog ¶ Version Description 8.1.0 flags changed from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. 8.0.0 encoding is nullable now. Examples ¶ Example #1 A htmlentities() example <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?> Example #2 Usage of ENT_IGNORE <?php $str = "x8F!!!"; // Outputs an empty string echo htmlentities($str, ENT_QUOTES, "UTF-8"); // Outputs "!!!" echo htmlentities($str, ENT_QUOTES | ENT_IGNORE, "UTF-8"); ?> See Also ¶ html_entity_decode() - Convert HTML entities to their corresponding characters get_html_translation_table() - Returns the translation table used by htmlspecialchars and htmlentities htmlspecialchars() - Convert special characters to HTML entities nl2br() - Inserts HTML line breaks before all newlines in a string urlencode() - URL-encodes string Php 3 05/05/2026 Php Function Ziping And Unziping Server Folders Using Php zip unzip directory folder backup mysql backup directory // I use a browser script that send the proper data to back up since if have multiple accounts. I separate the small files in one zip and large files in another. Under case 1. you will notice mp3 and zip this prevents bloated zips which may fail. Video and music should be done seperately from the rest of the files. I included a mysql backup that gets the data and makes a .sql file if you give it database information. class Utils { public static function listDirectory($dir) { $result = array(); $root = scandir($dir); foreach($root as $value) { if($value === '.' || $value === '..') { continue; } if(is_file("$dir$value")) { $result[] = "$dir$value"; continue; } if(is_dir("$dir$value")) { $result[] = "$dir$value/"; } foreach(self::listDirectory("$dir$value/") as $value) { $result[] = $value; } } return $result; } } /* use if you need to rename or auto download $file = '/path/to/zip/file.zip'; $file_name = basename($file); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=" . $file_name); header("Content-Length: " . filesize($file)); readfile($file); exit; */ $project=$_GET["pr"];$projectid=$_GET["id"];$PHPfolder=$_GET["fo"];$PHPdatabase=$_GET["db"];$user=$_GET["us"]; $password=$_GET["pa"];$return1=$_GET["re"]; $exportstring="pr=$project&fo=$PHPfolder&db=$PHPdatabase&us=$user&pa=$password&re=$return1&id=$projectid"; $server="localhost"; $AC=$_GET["L"]; $topDir=dirname(__FILE__); $folder0="/".$PHPfolder; $source_dir = $topDir.$folder0."/"; if(strlen($PHPfolder)==1)$source_dir = $topDir."/"; // For those sites where zipdemo is in their root if(is_dir($topDir."/BACKED")==false){ mkdir($topDir."/BACKED", 0777); } if($AC=="" && strlen($PHPdatabase)>1){ mysql_connect($server,$user,$password); mysql_select_db($PHPdatabase); $backupFile =$source_dir.$PHPdatabase.".sql"; $result .= "# MySQL Data Backup of ".$PHPdatabase."\n"; $result .= "# This was generated on " . date("m/d/Y") . "\n\n"; $tables = mysql_list_tables($PHPdatabase); for($i = 0; $i < mysql_num_rows($tables); $i++){ $table = mysql_tablename ($tables, $i); if(substr($table,0,7)!="tblStat"){ $result .= "# Start of $table \n"; $result .= "TRUNCATE TABLE $table;\n"; $query = mysql_query("select * from $table"); $num_fields = mysql_num_fields($query); $result .= "$table fields (\n"; for($ii = 0; $ii < $num_fields; $ii++) { $result.= mysql_field_name($query,$ii)."-".mysql_field_type($query,$ii)."(".mysql_field_len($query,$ii).")".mysql_field_flags($query,$ii)."\n"; } $result.=");\n"; $numrow = mysql_num_rows($query); while( $row = mysql_fetch_array($query, MYSQL_NUM)) { $result .= "INSERT INTO ".$table." VALUES("; for($j=0; $j<$num_fields; $j++) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); $row[$j] = str_replace("\r","",$row[$j]); if (isset($row[$j])) $result .= "\"$row[$j]\""; else $result .= "\"\""; if ($j<($num_fields-1)) $result .= ", "; } $result .= ");\n"; } } if ($i+1 != mysql_num_rows($tables)) $result .= "\n"; } $ID++; // =================== $fp = fopen($backupFile, "w"); fwrite($fp, $result); // Move to the start of the file fclose($fp); } //echo $topDir."/BACKED".$folder0."L.zip"; echo $exportstring;exit; switch($AC){ case 1: $zip_file = $topDir."/BACKED/".$project."L.zip"; $fi0=$_GET["fi0"]; $exportstring.="&fi0=$fi0&fi1=/BACKED/".$project."L.zip"; break; default: $zip_file = $topDir."/BACKED/".$project.".zip"; $exportstring.="&fi0=/BACKED/".$project.".zip"; break; } //echo $zip_file;exit; $file_list = Utils::listDirectory($source_dir); //echo "shit2";exit; $zip = new ZipArchive(); if ($zip->open($zip_file, ZIPARCHIVE::CREATE) === true) { foreach ($file_list as $file) { if ($file !== $zip_file) { switch($AC){ case 1: if(filesize($file)>= 250000 && strpos($file,".zip")==0 && strpos($file,".mp3")==0) $zip->addFile($file, substr($file, strlen($source_dir))); break; default: if(filesize($file)<= 250000) $zip->addFile($file, substr($file, strlen($source_dir))); break; } } //$i++;if($i==10)break; } $zip->close(); } if($AC==""){ header("location:zipdemo.php?$exportstring&L=1");exit; } else{ header("location:http://$return1?$exportstring"); exit; } ?> This script includes header files which may hiccup if error reporting is set to show warnings. The one below will handle warnings. class Utils { public static function listDirectory($dir) { $result = array(); $root = scandir($dir); foreach($root as $value) { if($value === '.' || $value === '..') { continue; } if(is_file("$dir$value")) { $result[] = "$dir$value"; continue; } if(is_dir("$dir$value")) { $result[] = "$dir$value/"; } foreach(self::listDirectory("$dir$value/") as $value) { $result[] = $value; } } return $result; } } /* $file = '/path/to/zip/file.zip'; $file_name = basename($file); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=" . $file_name); header("Content-Length: " . filesize($file)); readfile($file); exit; */ $project=$_GET["pr"];$projectid=$_GET["id"];$PHPfolder=$_GET["fo"];$PHPdatabase=$_GET["db"];$user=$_GET["us"]; $password=$_GET["pa"];$return1=$_GET["re"]; $project="Peak_Wellness";$PHPdatabase="the1324812461410";$user="the1324812461410";$password="v4K#htNPNfeG"; $return1="www.softwarewebdesign.com/SWD/EMAIL/backmeup.php";$projectid=27; $exportstring="pr=$project&fo=$PHPfolder&db=$PHPdatabase&us=$user&pa=$password&re=$return1&id=$projectid"; $server="the1324812461410.db.11744884.hostedresource.com"; $AC=$_GET["L"]; $topDir=dirname(__FILE__); $folder0="/".$PHPfolder; $source_dir = $topDir."/"; //.$folder0."/"; if(is_dir($topDir."/BACKED")==false){ mkdir($topDir."/BACKED", 0777); } if($AC=="" && strlen($PHPdatabase)>1){ mysql_connect($server,$user,$password); mysql_select_db($PHPdatabase); $backupFile =$source_dir.$PHPdatabase.".sql"; $result .= "# MySQL Data Backup of ".$PHPdatabase."\n"; $result .= "# This was generated on " . date("m/d/Y") . "\n\n"; $tables = mysql_list_tables($PHPdatabase); for($i = 0; $i < mysql_num_rows($tables); $i++){ $table = mysql_tablename ($tables, $i); if(substr($table,0,7)!="tblStat"){ $result .= "# Start of $table \n"; $result .= "TRUNCATE TABLE $table;\n"; $query = mysql_query("select * from $table"); $num_fields = mysql_num_fields($query); $result .= "$table fields (\n"; for($ii = 0; $ii < $num_fields; $ii++) { $result.= mysql_field_name($query,$ii)."-".mysql_field_type($query,$ii)."(".mysql_field_len($query,$ii).")".mysql_field_flags($query,$ii)."\n"; } $result.=");\n"; $numrow = mysql_num_rows($query); while( $row = mysql_fetch_array($query, MYSQL_NUM)) { $result .= "INSERT INTO ".$table." VALUES("; for($j=0; $j<$num_fields; $j++) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); $row[$j] = str_replace("\r","",$row[$j]); if (isset($row[$j])) $result .= "\"$row[$j]\""; else $result .= "\"\""; if ($j<($num_fields-1)) $result .= ", "; } $result .= ");\n"; } } if ($i+1 != mysql_num_rows($tables)) $result .= "\n"; } $ID++; // =================== $fp = fopen($backupFile, "w"); fwrite($fp, $result); // Move to the start of the file fclose($fp); } //echo "Done sql";exit; //echo $topDir."/BACKED".$folder0."L.zip"; echo $exportstring;exit; switch($AC){ case 1: $zip_file = $topDir."/BACKED/".$project."L.zip"; $fi0=$_GET["fi0"]; $exportstring.="&fi0=$fi0&fi1=/BACKED/".$project."L.zip"; break; default: $zip_file = $topDir."/BACKED/".$project.".zip"; $exportstring.="&fi0=/BACKED/".$project.".zip"; break; } //echo $zip_file;exit; $file_list = Utils::listDirectory($source_dir); //echo "shit2";exit; $zip = new ZipArchive(); if ($zip->open($zip_file, ZIPARCHIVE::CREATE) === true) { foreach ($file_list as $file) { if ($file !== $zip_file) { switch($AC){ case 1: if(filesize($file)>= 250000 && strpos($file,".zip")==0 && strpos($file,".mp3")==0) $zip->addFile($file, substr($file, strlen($source_dir))); break; default: if(filesize($file)<= 250000) $zip->addFile($file, substr($file, strlen($source_dir))); break; } } //$i++;if($i==10)break; } $zip->close(); } /* if($AC==""){ header("location:zipdemo.php?$exportstring&L=1");exit; } else{ header("location:http://$return1?$exportstring"); exit; } */ if($AC==""){ echo "Continue"; exit; } else{ echo "Continue"; exit; } ?> To unzip an archive just upload the archive and this script into the directory and run. Do this for both zips to get the complete archive. UNZIP SCRIPT $topDir=dirname(__FILE__)."/"; //echo $topDir;exit; $zip = new ZipArchive; if ($zip->open('SUBWAYL.zip') === TRUE) { $zip->extractTo($topDir); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> Php 1768 05/05/2026 Php Function Quick Debug Routine debug function ec($vari,$sect){ return "Section ".$sect." -- ".$vari.""; } $debug.=ec($_SESSION["FIELDSAVE1"],154); //line 154 Php 2 05/05/2026 Php Function String Length ord sub ____String length____strlen($val) ___String to ascii code____ord($val) $newstring=substr($val,25,1);$acii=ord($newstring); The 160 is a space problem for browsers ____section of string____substr($val,start,extract#of char) $newstring=substr($teaser,5,1); start at char 5 and remove 1 letter Php 3 05/05/2026