Exemple #1
0
// === Instantiate the class
$solmetraUploader = new SolmetraUploader('../', 'upload.php', '../config.php');
// === Gather uploaded files
// Flash Uploader populates PHP's own $_FILE global variable
// with the information about uploaded files
$solmetraUploader->gatherUploadedFiles();
if (isset($_FILES) && sizeof($_FILES)) {
    echo '<h2>Uploaded files</h2>';
    echo '<pre class="info">';
    print_r($_FILES);
    echo '</pre>';
}
?>

<h2>Test Form</h2>

<form action="demo2.php" method="post">

<h3>File #1</h3>
<?php 
echo $solmetraUploader->getInstance('secondFile', 500, 40, false, true, 'demo/custom2.xml', true);
?>

<p>This demo uses some external files. <a href="custom2.xml">View XML configuration file</a>.</p>

<br />
<input type="submit" value="Submit Form" />
</form>

</body>
</html>
Exemple #2
0
// with the information about uploaded files
$solmetraUploader->gatherUploadedFiles();
if (isset($_FILES) && sizeof($_FILES)) {
    echo '<h2>Uploaded files</h2>';
    echo '<pre class="info">';
    print_r($_FILES);
    echo '</pre>';
}
?>

<h2>Test Form</h2>

<form action="demo1.php" method="post">

<h3>File #1</h3>
<?php 
//$solmetraUploader->setDemo(10);
echo $solmetraUploader->getInstance('firstFile', 500, 40, true);
?>

<h3>File #2</h3>
<?php 
echo $solmetraUploader->getInstance('secondFile', 200, 220, false, true, 'demo/custom.xml', true);
?>

<br />
<input type="submit" value="Submit Form" />
</form>

</body>
</html>
Exemple #3
0
    echo '<h2>Uploaded files</h2>';
    echo '<pre class="info">';
    print_r($_FILES);
    echo '</pre>';
}
?>

<h2>Test Form</h2>

<p>This demo shows off Flash Uploader's JavaScript API. Namely seting up event/error listeners for various events as well as controling (starting and canceling) of the upload using API calls from JavaScript.</p>

<form action="demo3.php" method="post">

<h3>File #1</h3>
<?php 
echo $solmetraUploader->getInstance('firstFile', 500, 40, true, true, 'demo/custom3.xml');
?>

<script type="text/javascript">
SolmetraUploader.setErrorHandler('myError');
function myError (instance_id, error_id) {
  alert(error_id);
}
SolmetraUploader.setEventHandler('myEvent');
function myEvent (instance_id, event_id, data) {
  if (instance_id == '<?php 
echo $solmetraUploader->getLastInstance();
?>
') {
    switch(event_id) {
      case 'ready':
                if (str == 'error') {
                    document.getElementById("btn_submit").disabled= true;//btn_submit
                }
            }
            </script>
            <?php 
    // === Instantiate the class
    $jconfig = new JConfig();
    //var_dump($jconfig->sef);
    if ($jconfig->sef == '1') {
        $flashuploader_path = '../administrator/components/com_jomtube/assets/lib/FlashUploader/';
    } else {
        $flashuploader_path = 'administrator/components/com_jomtube/assets/lib/FlashUploader/';
    }
    $solmetraUploader = new SolmetraUploader($flashuploader_path, 'upload.php', 'administrator/components/com_jomtube/assets/lib/FlashUploader/config.php');
    echo $solmetraUploader->getInstance('file', 540, 40, false, true);
    ?>
        <?php 
}
?>
        <?php 
if ($this->c->uploader_type == 'flashupload') {
    ?>
            <div id="jomtube-upload-container" style="display: none;">
					<div class="uploadvideo-title">Upload Video To Server For Conversion</div>
        <?php 
}
?>
        <?php 
if ($this->c->uploader_type == 'normal') {
    ?>