This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.upto(61) { | |
|i| File.open("test" + i.to_s() + ".csv", 'w') {|file| | |
file.puts "The line that you want to write" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myErrorHandler($errno, $errstr, $errfile, $errline) | |
/** | |
* | |
* This is a collection of custom error handling procedures for the Leveraged Media System | |
* It is loaded in the main index file and overrides all error handling with the exception of fatal memory errors | |
*/ | |
{ | |
$myLog = new Log; | |
$myLog->set_page($_SERVER['PHP_SELF']); | |
switch ($errno) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Log{ | |
var $page_location; | |
var $log_msg; | |
function set_page($page_location){ | |
$this->page_location = $page_location; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//this moves the uploaded files to the correct place | |
include_once ('includes/csv_reader.php'); | |
include 'includes/dbconnect.php'; | |
$uploads = $_SERVER{'DOCUMENT_ROOT'} . "/site/uploads/"; | |
$approved = $uploads . 'ApprovedBilling.csv'; | |
if(!isset($_FILES['approved'])){} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['Submit'])){ //this nifty if statement checks to see if there is a submit in the post. | |
send_mail("[email protected]", $_POST['subject'], $_POST['message'], $_POST['header']); //if a submit is found, the email is sent | |
} | |
else { //is not, the form is displayed | |
show_form(); | |
} | |
NewerOlder