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 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 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 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 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 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 Function Create Graphic Button On The Fly grapic button image color session_start(); session_register('sessioncode'); //Header("Content-type: image/jpeg"); //echo "beg test"; $filename = "images/image1.gif"; $im = imagecreate(55, 15); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 100, 100, 100); imagecolortransparent($im, $bg); //imagestring($im, 5, 0, 0, substr(strtoupper(md5("Myshit".$sessioncode)), 0,6), $textcolor); imagestring($im, 5, 0, 0, substr(strtoupper("Myshit"), 0,6), $textcolor); imageGif($im,$filename); ImageDestroy($im); //*************************************************************** $filename = "images/image.gif"; $img = ImageCreate(200,20); $red = ImageColorAllocate($img, 255, 0, 0); $white = ImageColorAllocate($img, 255, 255, 255); ImageString($img, 3, 3, 3, "Uh, this is an image!", $white); ImageGif($img, $filename); ImageDestroy($img); echo ""; echo "Finished"; exit(); ?> Php 1236 05/05/2026 Php Function Automatically Make Urls Clickable hyperlinks click email url link 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; } Php 1618 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 Preg_match Is The Ereg Replacement ereg eregi preg_match preg match preg_match() Would be the pcre equivalent. The patterns will pretty much be the same, only real difference is that the preg_xxx functions require an opening/closing delimiter in the pattern and modifiers (if needed) are specified after the closing delimiter. So for instance: ereg(".",$var1) would be preg_match("~.~",$var1) // ~ is used as the pattern delimiter. or for instance, eregi(".",$var1) // case in-sensitive would be preg_match("~.~i",$var1) // i modifier added to make it case in-sensitive if(eregi("color",$fieldName)) preg_match("~color~i",$fieldName)) Php 1254 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 Php Function Choosing What Errors To See error reporting Developer php_flag display_startup_errors on .htacess php_flag display_errors on / Turn off all error reporting error_reporting(0); // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE); // Reporting E_NOTICE can be good too (to report uninitialized // variables or catch variable name misspellings ...) error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Report all errors except E_NOTICE error_reporting(E_ALL & ~E_NOTICE); // Report all PHP errors error_reporting(E_ALL); // Report all PHP errors error_reporting(-1); // Same as error_reporting(E_ALL); ini_set('error_reporting', E_ALL) Php 3 05/05/2026 Php Function Get Current Directory Name And Path In PHP working directory path file Directory Use the getcwd() Function to Get the Current Directory Name in PHP Use the dirname() Function to Get the Current Directory Name in PHP Use the basename() Function to Get the Current Directory Name in PHP Use the getcwd() Function to Get the Current Directory Name in PHP The getcwd() function gives the current working directory. The returned value is a string on success. The function does not take any parameters. The function returns false in case of failure. Let’s consider the following directory structure. ??? var ? ??? www ? ??? html | ???project | ???index.php The PHP file lies inside the project directory. The getcwd() function will return the name of the current working directory, which is project. We can use the echo function to display the content of the function. We can see in the output section that the getcwd() function returns the current working directory with its path. echo getcwd(); Output: /var/www/html/project Use the dirname() Function to Get the Current Directory Name in PHP We can also use the dirname() function to get the current directory name in PHP. The function returns the path of the parent directory. It accepts two parameters where the first one is the path and the second one is levels. Levels indicate the number of directories to move up. Finally, we can use the __FILE__ magic constants in the dirname() function to get the name of the current directory. The __FILE__ constant returns the full path of the current file along with the file name. We can demonstrate these constants and the function in the above directory structure. For example, we get the following result when we echo the __FILE__ constant from the index.php file. echo __FILE__; Output: /var/www/html/project/index.php For example, write the dirname() function in the index.php file with the __FILE__ constant as the parameter. echo dirname(__FILE__); $topDir=dirname(__FILE__); Output: /var/www/html/project In this way, we can get the current working directory name in PHP. Use the basename() Function to Get the Current Directory Name in PHP We can use the basename() function to get the current working directory name without the path in PHP. We can apply this function with the result of the above two functions. The basename() function returns the name of the base file or folder from the given path. For example, if the path provided is /var/www/html/project, the output will be project. For example, use the functions dirname(__FILE__) and getcwd() as the parameters for the basename() function. In this way, we can get the current working directory name in PHP. echo basename(dirname(__FILE__)).""; echo basename(getcwd())."n"; Output: Php 3 05/05/2026