function groupon_csv_import() { ?> <h3>Groupon Import</h3> <ul> <li> <p>This page is for importing your events from a comma seperated file (CSV) directly into the the events database. The limitation of this upload is that it does not support the extra questions, only the core event configuration. </p> <ul> <li>Please use Y where you want to say Yes and N where you want No.</li> <li>Dates should be formatted YYYY-MM-DD (2009-07-04).</li> <li>I have included a template file <a href="<?php echo EVENT_ESPRESSO_PLUGINFULLURL; ?> events.csv">here</a> that I recommend you download and use. It is very easy to work with it in excel, just remember to save it as a csv and not excel sheet.</li> <li>The file name should be events.csv in order for it to work. I will fix this issue later, I just wanted to get this working first.</li> </ul> <p>One final note, you will see that the header row, fist column has a 0 while other rows have a 1. This tells the upload to ignore rows that have the 0 identifier and only use rows with the 1.</p> <p>This is the first pass at the uploader, but for those of you who have alot of events, particularly events that are similar in setup, this will be a time saver.</p> <?php uploader(); load_events_to_db(); ?> </li> </ul> <?php }
<div id="content"> <h1>Batch Content Ingest</h1> <div id="summary"> <p class="about"> <?php $files = uploader(10); //print_r($files); // print_r($GLOBALS); if (isset($_POST['label'])) { $agent = new Agent(); $agent->addDatastreams($files, "A", "Batch Ingest of content", $_POST['label']); } ?> </p> </div> <hr/> <div id="footer"> <p id="footer_copyright"> Copyright ©2007 <b>ARROW</b>, All right reserved </p>
$category = !isset($_GET["category"]) ? 0 : explode(";", $_GET["category"]); // sanitize categories id if (is_array($category)) { $category = array_map("intval", $category); } else { $category = 0; } $combo_categories = categories($category[0]); //uploader $uploader = !isset($_GET["uploader"]) ? 0 : explode(";", $_GET["uploader"]); if (is_array($uploader)) { $uploader = array_map("intval", $uploader); } else { $uploader = 0; } $combo_uploader = uploader($uploader[0]); isset($_GET["active"]) && is_numeric($_GET["active"]) && $_GET["active"] >= 0 && $_GET["active"] <= 2 ? $active = intval($_GET["active"]) : ($active = 1); // start advanced search hack DT if (isset($_GET["options"])) { $options = intval($_GET["options"]); } else { $options = 0; } // end advanced search hack DT if ($active == 0) { $where = " WHERE 1=1"; $addparam .= "active=0"; } elseif ($active == 1) { $where = " WHERE {$tleechs}+{$tseeds} > 0"; $addparam .= "active=1"; } elseif ($active == 2) {
</tr> </table> </form> <?php } else { if ($action == 'upload') { ?> <h3><?php echo _("Upload Backup:"); ?> </h3> <table><tr><td> <?php echo uploader(); ?> <br> Max Upload size is 100mb. <br><br><br><br><br><br><br><br><br><br><br> </td></tr></table> <?php } else { if ($action == 'ftpconfig') { $ftpconfig = $_REQUEST['ftpconfig']; if ($ftpconfig == 'save') { $ftpbackup = $_POST["ftpbackup"]; $ftpuser = $_POST["ftpuser"];
font-weight: 800; outline: 0; border: 0; cursor: pointer; font-size: 1.35em; margin-bottom:10px; padding: 0.6em 1.5em;" >Cancel</a>'; $db->disconnect(); } else { // $course_id = $_POST['course']; $level_id = $_POST['level']; $subject_id = $_POST['subject']; $year = $_POST['year']; $upload_id = uploader(); //uploaded() function returns the id of the paper from the database if the paper is saved successfully,else returns false if ($upload_id) { //show the details of the uploaded file with the details below: echo '<br>File successfully uploaded.'; $conn = new Database(); $conn->connect(); $sql = "SELECT * FROM courses WHERE id = " . $course_id; $course_obj = $conn->query($sql); $course_name = $course_obj->fetch_object()->course_name; $sql = "SELECT * FROM levels WHERE id = " . $level_id; $level_obj = $conn->query($sql); $level_name = $level_obj->fetch_object()->level_name; $sql = "SELECT * FROM subjects WHERE id = " . $subject_id; $subject_obj = $conn->query($sql); $subject_name = $subject_obj->fetch_object()->sub_name;