function cfopen($filename, $mode, $overwriteanyway = false) { global $dir_fileopen; clearstatcache(); do { $id = md5(randomid(rand(), TRUE)); $tempfilename = $dir_fileopen . "/" . $id . md5($filename); } while (file_exists($tempfilename)); if (file_exists($filename)) { $newfile = false; copy($filename, $tempfilename); } else { $newfile = true; } $fp = fopen($tempfilename, $mode); return $fp ? array($fp, $filename, $id, @filemtime($filename), $newfile, $overwriteanyway) : false; }
<?php ob_start(); $modid = 100; $mod_id = 62; #$modinid=52; include "AMP/BaseDB.php"; include "AMP/BaseTemplate.php"; include "AMP/BaseModuleIntro.php"; include_once "AMP/System/Email.inc.php"; include "dropdown.php"; $board = "ride"; if ($MM_insert || $MM_update) { if ($MM_insert) { $uniqueid = randomid(); } else { $MM_editColumn = "uniqueid"; $MM_recordId = $dbcon->qstr($uniqueid); $MM_editRedirectUrl = $Web_url . "rides.php?uid=" . $uniqueid; } $MM_editTable = $board; $MM_fieldsStr = "firstname|value|lastname|value|phone|value|email|value|state|value|depatingfrom|value|depaturedate|value|returningto|value|returndate|value|numpeople|value|ride|value|commets|value|publish|value|uniqueid|value|pemail|value"; $MM_columnsStr = "firstname|',none,''|lastname|',none,''|phone|',none,''|email|',none,''|state|',none,''|depatingfrom|',none,''|depaturedate|',none,''|returningto|',none,''|returndate|',none,''|numpeople|',none,''|need|',none,''|commets|',none,''|publish|',none,''|uniqueid|',none,''|pemail|',none,''"; if ($MM_insert) { //Check to see if e-mail is in system $checkfirst = $dbcon->Execute("Select * from {$board} where pemail=" . $dbcon->qstr($_POST['pemail']) . " or email=" . $dbcon->qstr($_POST['email'])); if ($checkfirst->RecordCount() > 0) { $MM_abortEdit = 1; $problem = "<strong><p class=docbox>The email address you entered is already registered on the ride board. Please use <a href=\"rides.php?uid=" . $checkfirst->Fields("uniqueid") . "\">this link</a> to login or enter new information below.</strong><P>"; } if (!$MM_abortEdit) {