コード例 #1
0
ファイル: video_upload.frm.php プロジェクト: jmathai/photos
    $fv = new CFormValidator();
    $fv->setForm('_videoUpload');
    $fv->addElement('name', 'Name', '  - Please enter a name for your video.', 'length');
    $fv->setMaxElementsToDisplay(5);
    $fv->setDebugOutput(false);
    $fv->setFunctionName('_val_video');
    // in conditional below $fv -> setEval('submitDivEff1.toggle();'); // postItVideo(\'' . $sess_id . '\');
    // below conditional $fv -> validate();
    $sess_id = md5($_USER_ID . NOW);
    $user_enc = $u->userIdEnc($_USER_ID);
    if (isset($_GET['videoId'])) {
        $videoData = $v->find($_GET['videoId']);
        $frmAct = '/?action=video.update.act';
        $mode = 'update';
    } else {
        $fv->setEval('submitDivEff1.toggle();');
        // postItVideo(\'' . $sess_id . '\');
        $frmAct = "/cgi-bin/upload_video.cgi?sessionid={$sess_id}&user_enc={$user_enc}";
        //'/upload_video'; //
        $mode = 'insert';
        $videoData['V_PRIVACY'] = PERM_VIDEO_DEFAULT;
    }
    $fv->validate();
    if ($_GET['message'] == 'fileTooLarge') {
        echo '<div class="confirm"><img src="images/icons/warning_alt_2_24x24.png" class="png" width="24" height="24" border="0" align="absmiddle" hspace="4" />The file you tried to upload was too large.</div>';
    }
    ?>

<div class="bold">
  <img src="images/icons/movie_24x24.png" class="png" width="24" height="24" border="0" hspace="4" align="absmiddle" />Upload a video
</div>
コード例 #2
0
ファイル: cart_checkout.frm.php プロジェクト: jmathai/photos
    $fv->addElement('s_zip', 'Shipping Zip Code', '  - Please enter your shipping zip code.', 'length');
    $fv->addElement('s_state', 'Shipping State', '  - Please select your shipping state.', 'selectboxnull');
}
$fv->addElement('cc_nameFirst', 'First Name', '  - Please enter your first name as it appears on the credit card.', 'length');
$fv->addElement('cc_nameLast', 'Last Name', '  - Please enter your last name as it appears on the credit card.', 'length');
$fv->addElement('b_address', 'Billing Street', '  - Please enter your billing street.', 'length');
$fv->addElement('b_city', 'Billing City', '  - Please enter your billing city.', 'length');
$fv->addElement('b_zip', 'Billing Zip Code', '  - Please enter your billing zip code.', 'length');
$fv->addElement('b_state', 'Billing State', '  - Please select your billing state.', 'selectboxnull');
$fv->addElement('cc_number', 'Credit Card Number', '  - Please enter your credit card number.', 'length');
$fv->addElement('cc_cvv', 'Credit Card CCV', '  - Please enter the CCV number on the back of your credit card.', 'length');
$fv->addElement('accept_terms_of_sale', 'Accept Terms of Sale', '  - Please check the "Accept Terms of Sale" checkbox.', 'checkboxmin1');
$fv->setMaxElementsToDisplay(5);
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_checkout');
$fv->setEval('document.getElementById(\'_message\').innerHTML = \'<div>Please wait...</div><img src="images/loading_bar.gif" width="100" height="12" border="0" style="padding-top:3px;" />\'; document.getElementById(\'_message\').style.display = \'block\';');
$fv->validate();
?>
</table>
<br /><br />
<table cellpadding="0" cellspacing="0" border="0"  width="710">
    <tr >
      <td background="images/billing_headerBG.gif" colspan="2"><img src="images/order_review.gif" /></td>
      <?php 
if ($shipping === true) {
    echo '<td background="images/billing_headerBG.gif" colspan="2"><img src="images/shipping.gif" /></td>';
}
?>
      <td background="images/billing_headerBG.gif"><img src="images/credit_card_info.gif" /></td>
    </tr>
    <tr>
コード例 #3
0
ファイル: mp3_upload.frm.php プロジェクト: jmathai/photos
?>
" method="post">
                <span class="bold">Upload your own MP3 file.</span>
                <br /><br />
                <span class="bold">Name:</span><br />
                <input type="text" name="um_name" class="formfield" value="<?php 
if ($update === true) {
    echo $mp3_data['M_NAME'];
}
?>
" style="width:175px;" /><br /><br />
                <?php 
if ($update === false) {
    $fv->addElement('file[]', 'MP3 File', '  - Select a valid MP3 file.', 'regexp/.*\\.mp3$/i');
    //$fv -> setEval('upload()');
    $fv->setEval('postItMp3(\'' . $sess_id . '\'); opacity(\'uploaderHtml\', 100, 0, 750, true); setTimeout(\'uploaderCover()\', 1000);');
    echo '<span class="bold">MP3*:</span><br />
                          <input type="file" name="file[]" class="formfield" />&nbsp;(Max 10MB)<br />
                          <a href="javascript:_mp3Submit();"><img src="images/buttons/upload.gif" width="87" height="27" vspace="5" border="0" /></a>
                          <div style="padding-top:5px;">* Please make sure that the MP3 is 44kHz</div>
                          <div style="margin-top:10px; width:250px; height:60px; display:none;" id="uploadProgressDiv"><img src="images/loading_bar.gif" width="100" height="12" border="0" style="padding-top:3px;" /></div>';
} else {
    echo '<a href="javascript:_mp3Submit();"><img src="images/buttons/update.gif" width="87" height="27" vspace="5" border="0" /></a>
                          <input type="hidden" name="um_id" value="' . $mp3_data['M_ID'] . '" />';
}
?>
                <input type="hidden" name="um_u_id" value="<?php 
echo $_USER_ID;
?>
" />
              </form>