コード例 #1
0
ファイル: reprocess.php プロジェクト: makerling/osm_website
function processByQuery($query)
{
    $result = mysql_query($query) or die("<pre>" . $query . mysql_error() . "</pre>");
    $count = 0;
    while ($myrow = mysql_fetch_array($result)) {
        processUpload($myrow['id'], $myrow['bibleTitleId']);
        $count++;
    }
    return $count;
}
コード例 #2
0
ファイル: index.php プロジェクト: khanab85/OmniChannelDemo
function processRequest()
{
    // if POST
    // -> handle Upload
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        header('Content-type: application/json');
        echo json_encode(processUpload());
    } else {
        $imageId = getRequestParameter("img");
        header("Content-type: image/jpeg");
        echo showImage($imageId);
    }
}
コード例 #3
0
                        }
                    }
                }
            }
        }
        if (!$msg) {
            $msg = $lang["events_added"];
        }
        header("Location: upload_events.php?msg=" . $msg . "&" . $common_get);
    }
}
if (!$superpost) {
    mysql_close($link);
    $msg = $lang["no_permision_post_events"];
    header("Location: upload_events.php?msg=" . $msg . "&" . $common_get);
} else {
    switch ($_REQUEST["mode"]) {
        case $lang["upload_csv_file"]:
            include "includes/header.php";
            processUpload();
            break;
        case $lang["add_events"]:
            addEvents();
            break;
        default:
            include "includes/header.php";
            uploadForm();
            break;
    }
}
include "includes/footer.php";
コード例 #4
0
ファイル: edit.php プロジェクト: Boris-de/videodb
    if (!$owner_id) {
        $owner_id = get_current_user_id();
    }
    // generate diskid
    if (empty($diskid) && $config['autoid'] && $mediatype != MEDIA_WISHLIST) {
        $diskid = getDiskId();
    }
    // write videodata table
    $SETS = prepareSQL($GLOBALS);
    $id = updateDB($SETS, $id, $oldmediatype == MEDIA_WISHLIST && $mediatype != MEDIA_WISHLIST);
    // save genres
    setItemGenres($id, $genres);
    // set seen for currently logged in user
    set_userseen($id, $seen);
    // uploaded cover?
    processUpload($id, $_FILES['coverupload']['tmp_name'], $_FILES['coverupload']['type'], $_FILES['coverupload']['name']);
    // make sure no artifacts
    $smarty->clearCache('list.tpl');
    $smarty->clearCache('show.tpl', get_current_user_id() . '|' . $id);
    // add another?
    if ($add_flag) {
        // remove id to prevent edit mode instead of new
        $id = '';
        $smarty->assign('add_flag', $add_flag);
    } else {
        // show the saved movie
        redirect('show.php?id=' . $id);
    }
}
// load existing data
if ($id) {
コード例 #5
0
<?php

/******************mediafire.com****************************\
mediafire.com Member Upload Plugin
WRITTEN by Raj Malhotra on 06 Feb 2011
\******************mediafire.com****************************/
####### Free Account Info. ###########
$mediafire_login = "";
$mediafire_pass = "";
######################################
processUpload($mediafire_login, $mediafire_pass, $lfile, $lname);
function processUpload($mediafire_login, $mediafire_pass, $lfile, $lname)
{
    global $download_link, $delete_link, $page_upload;
    $continue_up = false;
    if ($mediafire_login & $mediafire_pass) {
        $_REQUEST['my_login'] = $mediafire_login;
        $_REQUEST['my_pass'] = $mediafire_pass;
        $_REQUEST['action'] = "FORM";
        echo "<b><center>Use Default login/pass.</center></b>\n";
    }
    if ($_REQUEST['action'] == "FORM") {
        $continue_up = true;
    } else {
        ?>
		<table border="1" style="width: 540px;" cellspacing="0" align="center" >
			<form method="post">
				<input type="hidden" name="action" value='FORM' />
			
				<tr>
				  <td colspan="4" align="center" height="25px" ><b> Enter Member Account </b> </td>
コード例 #6
0
ファイル: importCSV.php プロジェクト: krievley/schedule
            }
        }
    }
    if (!$msg) {
        $msg = "{$added} {$ax['iex_events_added']}" . ($dropped > 0 ? " / {$dropped} {$ax['iex_events_dropped']}" : '');
    }
    return $msg;
}
//control logic
$msg = '';
$errors = 0;
//init
if ($privs == 9) {
    //admin
    if (isset($_POST['uploadFile'])) {
        $msg = processUpload();
    }
    if (isset($_POST['uploadFile']) and !$msg or isset($_POST['addEvents'])) {
        $errors = processEvtFields($_POST['sDate'], $_POST['eDate'], $_POST['sTime'], $_POST['eTime'], $_POST['title'], $_POST['catID']);
    }
    if (isset($_POST['addEvents']) and !$errors) {
        $msg = addEvents();
        //add events to calendar
    }
    echo "<p class='error'>{$msg}</p>\n";
    echo "<div class='scrollBoxAd'>\n";
    if (!isset($_POST['uploadFile']) and !isset($_POST['addEvents']) or isset($_POST['uploadFile']) and $msg) {
        instructions();
    }
    echo "<div class='centerBox'>\n";
    if (!isset($_POST['uploadFile']) and !isset($_POST['addEvents']) or isset($_POST['uploadFile']) and $msg) {
コード例 #7
0
ファイル: upload.php プロジェクト: stillfinder/Program-O
/***************************************
 * http://www.program-o.com
 * PROGRAM O
 * Version: 2.4.8
 * FILE: upload.php
 * AUTHOR: Elizabeth Perreau and Dave Morton
 * DATE: FEB 01 2016
 * DETAILS: Provides functionality to upload AIML files to a chatbot's database
 ***************************************/
ini_set('memory_limit', '128M');
ini_set('max_execution_time', '0');
ini_set('display_errors', false);
ini_set('log_errors', true);
libxml_use_internal_errors(true);
$bot_id = $bot_id == 'new' ? 0 : $bot_id;
$msg = array_key_exists('aimlfile', $_FILES) ? processUpload() : '';
$upperScripts = <<<endScript

    <script type="text/javascript">
<!--
      function showMe() {
        var sh = document.getElementById('showHelp');
        var tf = document.getElementById('uploadForm');
        sh.style.display = 'block';
        tf.style.display = 'none';
      }
      function hideMe() {
        var sh = document.getElementById('showHelp');
        var tf = document.getElementById('uploadForm');
        sh.style.display = 'none';
        tf.style.display = 'block';
コード例 #8
0
ファイル: server.php プロジェクト: btm6084/php-web-server
 // Check to see if we are recieving a file from SWFUpload. If not, process as normal.
 $pattern = "/User-Agent: Shockwave Flash/";
 if (preg_match($pattern, $request)) {
     $head = explode(PHP_EOL, $request);
     $temp = $head[count($head) - 5];
     $pattern = "/Content-Length: ([0-9]*)/";
     if (preg_match($pattern, $temp, $matches)) {
         $postInfo = "";
         do {
             $inbound = stream_socket_recvfrom($conn, 1);
             $postInfo .= $inbound;
             $request .= $inbound;
         } while (strlen($postInfo) < $matches[1]);
     }
     // Process from SWFUpload
     processUpload($request, $webroot);
     // Return OK
     $headers = array();
     $headers[] = "HTTP/1.1 200 OK";
     stream_socket_sendto($conn, implode("\r\n", $headers) . "\r\n\r\n");
     fclose($conn);
     // Else, it's just a normal HTTP request. Serve it up.
 } else {
     // Parse the headers segment into individual headers
     preg_match_all("/(?P<name>[^:]+): (?P<value>[^\r]+)(?:\$|\r\n[^ \t]*)/U", $request, $parsed, PREG_SET_ORDER);
     $fileString = '';
     $contentLength = 0;
     $post = false;
     $postString = "";
     $getString = "";
     // Extract the parsed fields into something usable.
コード例 #9
0
ファイル: upload.php プロジェクト: vanderling/osm_website
    rmdir($docDir . "/thumbs");
    $files = scandir($docDir);
    foreach ($files as $file) {
        if ($file != '.' and $file != '..') {
            unlink($docDir . "/" . $file);
        }
    }
    rmdir($docDir);
}
if ($_POST['devent'] == 'upload_files' and $_FILES) {
    foreach ($_FILES as $file => $array) {
        if (strtolower(substr($array['name'], -4)) == '.jpg' or strtolower(substr($array['name'], -5)) == '.oxes' or strtolower(substr($array['name'], -4)) == '.zip') {
            $uploadDir = upload_file($bookId, $file);
        }
    }
    processUpload($bookId, $bibleTitleId);
}
// get bible title options
$bibleTitle_options = '';
$query = "SELECT * FROM `bibleTitles`\r\n WHERE `code` = \"" . mysql_real_escape_string($sec_code) . "\"\r\n ORDER BY `title`\r\n";
$result = mysql_query($query) or die("<pre>" . $query . mysql_error() . "</pre>");
while ($myrow = mysql_fetch_array($result)) {
    $bibleTitle_options .= "<option value=\"" . $myrow['title'] . "\" " . $selected . ">" . $myrow['title'];
}
// get book name options
$bookName_options = '';
$query = "SELECT * FROM `books`\r\n WHERE `bibleTitleId` = \"" . $bibleTitleId . "\"\r\n ORDER BY `displayOrder`, `name`\r\n";
$result = mysql_query($query) or die("<pre>" . $query . mysql_error() . "</pre>");
while ($myrow = mysql_fetch_array($result)) {
    $bookName_options .= "<option value=\"" . $myrow['name'] . "\" " . $selected . ">" . $myrow['name'];
}
コード例 #10
0
ファイル: upload.php プロジェクト: araynaud/FoodPortrait
$upload_id = postParam("upload_id");
debugVar("username", true);
debug("Request", $_REQUEST);
debug("GET request", $_GET);
debug("POST request", $_POST);
debug("POST files", $_FILES, true);
if (empty($_FILES) && !$upload_id) {
    return errorMessage("No File uploaded.");
}
$response = $result = array();
$db = NULL;
$success = true;
$nbFiles = count($_FILES);
if ($nbFiles) {
    foreach ($_FILES as $file) {
        $result[] = processUpload($file);
    }
}
if ($nbFiles == 1) {
    $response = reset($result);
    $success = $response["success"];
    $exif = $response["_exif"];
}
if ($success) {
    if (!$upload_id) {
        //step 1
        $upload_id = saveUploadData($db, $exif);
    } else {
        $success = saveUploadData($db, $_POST);
        $message = "Details saved.";
    }