コード例 #1
0
<?php

$s =& CSubscription::getInstance();
$subscriptions = $s->getSubscriptions($_USER_ID);
$fv = new CFormValidator();
$fv->setForm('_subscriptionsForm');
$fv->addElement('email_1', 'Email', '  - Please enter at least one email address.', 'email');
$fv->setMaxElementsToDisplay(5);
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_registration');
$fv->validate();
if (isset($_GET['message'])) {
    switch ($_GET['message']) {
        case 'added':
            $message = '<img src="images/icons/checkmark_16x16.png" class="png" width="16" height="16" hspace="5" align="absmiddle" />Email addresses have been added';
            break;
        case 'deleted':
            $message = '<img src="images/icons/delete_16x16.png" class="png" width="16" height="16" hspace="5" align="absmiddle" />Email address has been deleted.';
            break;
    }
    if ($message != '') {
        echo '<div class="confirm">' . $message . '</div>';
    }
}
?>

<div class="f_12 bold"><img src="images/icons/network-wireless_22x22.png" class="png" width="22" height="22" align="absmiddle" />&nbsp;Let others know when you add photos or create a slideshow</div>

<div style="margin-left:25px; margin-top:25px;">
  <div style="margin-bottom:5px;">When you add a photo or slideshow to your personal page the following people will receive an email.</div>
  
コード例 #2
0
<?php

$_SESSION_HASH = $_FF_SESSION->value('sess_hash');
$us =& CUser::getInstance();
if ($_FF_SESSION->value('temp_user_id') > 0) {
    $userTemp = $us->inactive($_FF_SESSION->value('temp_user_id'));
} else {
    $userTemp = $us->find($_USER_ID);
}
$ec =& new CEcom($_USER_ID, $_SESSION_HASH);
$accounts = $ec->getGroup(4);
$fv = new CFormValidator();
$required = '<span class="f_dark_accent">&nbsp;<sup>*</sup></span>';
$fv->setForm('_registration');
$fv->addElement('u_nameFirst', 'First Name', '  - Please enter your first name.', 'length');
$fv->addElement('u_nameLast', 'Last Name', '  - Please enter your last name.', 'length');
$fv->addElement('u_address', 'Address', '  - Please enter your address.', 'length');
$fv->addElement('u_city', 'City', '  - Please enter your city.', 'length');
$fv->addElement('u_state', 'State', '  - Please select your state.', 'selectboxnull');
$fv->addElement('u_zip', 'Zip', '  - Please enter your zip code.', 'length');
$fv->addElement('accountType', 'Account Type', '  - Please choose an account type.', 'selectboxnull');
$fv->addElement('ecom_cc_num', 'Credit Card Number', ' - Please make sure your credit card number is correct.', 'mod10');
$fv->addElement('ecom_cc_cvv', 'Credit Card CVV', ' - Please enter your credit card cvv number.', 'length');
$fv->addElement('accept_terms', 'Accept Terms', '  - Please check the "Accept Terms" checkbox.', 'checkboxmin1');
$fv->setMaxElementsToDisplay(5);
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_registration');
$fv->validate();
// validate method called at bottom
echo samplesNavigation(array('samples', 'demo', 'tour', 'features', 'aboutus'));
?>
コード例 #3
0
ファイル: contactus.dsp.php プロジェクト: jmathai/photos
<?php

$fv = new CFormValidator();
$fv->setForm('_contact');
$fv->addElement('email_name', 'Your Name', '  - Please enter your name.', 'length');
$fv->addElement('email_from', 'Your Email', '  - Please enter your email address.', 'email');
$fv->addElement('email_message', 'Message', '  - Please enter your message.', 'length');
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_contact');
$fv->validate();
if (isset($_GET['message'])) {
    switch ($_GET['message']) {
        case 'email_sent':
            $message = '<img src="images/icons/checkmark_24x24.png" class="png" width="24" height="24" border="0" align="absmiddle" hspace="5" />Your inquiry was successfully sent.  You should receive a response within one business day.';
            break;
        default:
            $message = '';
            break;
    }
    echo '<div class="confirm">' . $message . '</div>';
}
?>


<div class="dataSingleContent">
  <div class="bold">Customer Support</div>
  Please check our <a href="/?action=home.help">FAQs</a> for answers to many common questions.  
  You'll find the information you need on topics ranging from setting up an account to adding pictures to placing orders.  
  You'll also find lots of tutorials throughout the site.
  <br /><br />
  <div class="bold">Write to us</div>
コード例 #4
0
<?php

$board = CBoard::getInstance();
$user = CUser::getInstance();
$validator = new CFormValidator();
$bID = $_GET['board_id'];
$boardData = $board->board($bID);
$profileData = $user->profile($_USER_ID);
$avatarSrc = $profileData['P_AVATAR'] != '' ? PATH_FOTO . $profileData['P_AVATAR'] : 'images/avatar.jpg';
$validator->setForm('_newTopic');
$validator->addElement('bp_title', 'Title', '  - Please enter a title for the post.', 'length');
$validator->addElement('bpc_content', 'Content', '  - Please enter the content of your post.', 'length');
$validator->setDebugOutput(false);
$validator->setFunctionName('_val_post');
$validator->validate();
?>
<div class="dataSingleContent">
  <div>
    <img src="images/community_welcome.gif" width="300" heihgt="88" border="0" vspace="10" />
  </div>
  <div style="padding-bottom:5px;">
    <a href="/?action=board.main">Community</a> >> <a href="/?action=board.board_view&board_id=<?php 
echo $bID;
?>
"><?php 
echo $boardData['B_TITLE'];
?>
</a> >> (New Topic)
  </div>
  
  <div style="width:735px;">
コード例 #5
0
ファイル: board_reply.frm.php プロジェクト: jmathai/photos
$board = CBoard::getInstance();
$user = CUser::getInstance();
$validator = new CFormValidator();
$pID = $_GET['post_id'];
$postData = $board->singlePost($pID);
$boardData = $board->board($postData['BP_BID']);
$profileData = $user->profile($_USER_ID);
$avatarSrc = $profileData['P_AVATAR'] != '' ? PATH_FOTO . $profileData['P_AVATAR'] : 'images/avatar.jpg';
$quoteStr = '';
if (isset($_GET['reply_id'])) {
    $rID = $_GET['reply_id'];
    $quoteData = $board->post($rID);
    $quoteUser = $user->find($quoteData[0]['BP_UID']);
    $quoteStr = "[quote][i]Posted by: " . $quoteUser['U_USERNAME'] . " on " . date('D M j, Y g:i a', $quoteData[0]['BP_DATECREATED']) . "[/i]\n\n" . $quoteData[0]['BP_CONTENT'] . "[/quote]";
}
$validator->setForm('_reply');
$validator->addElement('bpc_content', 'Content', '  - Please enter the content of your post.', 'length');
$validator->setDebugOutput(false);
$validator->setFunctionName('_val_post');
$validator->validate();
?>

<div class="dataSingleContent">
  <div>
    <img src="images/community_welcome.gif" width="300" heihgt="88" border="0" vspace="10" />
  </div>
  
  <div style="padding-bottom:5px;">
    <a href="/?action=board.main">Community</a> >> <a href="/?action=board.board_view&board_id=<?php 
echo $postData['BP_BID'];
?>
コード例 #6
0
ファイル: cart_checkout.frm.php プロジェクト: jmathai/photos
                  </td>
                  <td align="center" background=' . $bg . ' class="f_8 f_black bold">' . $v['quantity'] . '</td>
                  <td align="center" background=' . $bg . ' class="f_8 f_black bold">$' . $v['totalprice'] . '</td>
                </tr>';
        $total += $v['totalprice'];
    }
}
$total = number_format($total, 2);
echo '<tr height="1">
              <td colspan="3"><div class="line_dark"></div></td>
            </tr>
            <tr>
              <td colspan="2" align="right" class="bold">Total:&nbsp;</td>
              <td align="center" class="f_8 f_red bold">$' . $total . '</td>
            </tr>';
$fv->setForm('_checkout');
if ($shipping === true) {
    $fv->addElement('s_shipping', 'Shipping Method', '  - Please select your shipping method.', 'selectboxnull');
    $fv->addElement('s_nameFull', 'Shipping Name', '  - Please enter your shipping name.', 'length');
    $fv->addElement('s_address', 'Shipping Street', '  - Please enter your shipping street.', 'length');
    $fv->addElement('s_city', 'Shipping City', '  - Please enter your shipping city.', 'length');
    $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');
コード例 #7
0
ファイル: cart_view.dsp.php プロジェクト: jmathai/photos
$items = $ecom->getCartItems();
$cnt_items = count($items);
$has_account = false;
foreach ($items as $v) {
    if (strncmp($v['ecg_type'], 'account', 7) == 0) {
        $has_account = true;
        break;
    }
}
if ($has_account === false) {
    $redirect = '/?action=cart.checkout_form';
} else {
    $redirect = '/?action=home.registration_form_d';
}
$fv = new CFormValidator();
$fv->setForm('_cart');
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_cart');
?>
<table cellpadding="0" cellspacing="0" border="0" width="733" align="center">
  <tr height="28">
    <td colspan="4"></td>
  </tr>
  <tr>
    <td colspan="4"><div class="line_dark"></div></td>
  </tr>
  <form action="/?action=cart.update.act&redirect=<?php 
echo urlencode($redirect);
?>
" name="_cart" method="POST">
    <tr height="28">
コード例 #8
0
ファイル: password_reset.frm.php プロジェクト: jmathai/photos
<?php

$align = $tpl->mode == 'single' ? 'center' : 'left';
$fv = new CFormValidator();
$fv->setForm('_password');
$fv->addElement('u_email', 'Email', '  - Please enter the email address you registered with.', 'length');
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_password');
$fv->validate();
if (isset($_GET['message'])) {
    switch ($_GET['message']) {
        case 'password_reset':
            $message = 'Your password has been reset and sent to the email address you specified.';
            $image = 'images/icons/checkmark_24x24.png';
            break;
        case 'email_not_found':
            $email = isset($_GET['email']) ? $_GET['email'] : 'none';
            $message = 'Sorry, we were unable to find the email address you entered (<i>' . $email . '</i>) in our database.';
            $image = 'images/icons/warning_24x24.png';
            break;
        case 'email_not_valid':
            $email = isset($_GET['email']) ? $_GET['email'] : 'none';
            $message = 'Sorry, the email address you entered (<i>' . $email . '</i>) does not appear to have valid syntax.';
            $image = 'images/icons/warning_24x24.png';
            break;
        case 'secret_question':
            $email = isset($_GET['email']) ? $_GET['email'] : 'none';
            $message = 'Sorry, but what you entered for "Mother\'s Maiden Name" did not match our records .';
            $image = 'images/icons/warning_24x24.png';
            break;
        default:
コード例 #9
0
ファイル: group.frm.php プロジェクト: jmathai/photos
    } else {
        $update = false;
        $submit_src = 'create_group.gif';
    }
} else {
    $update = false;
    $submit_src = 'create_group.gif';
}
if ($action == 'fotogroup.group_share_form') {
    $gp_form_mode = 'included';
} else {
    $gp_form_mode = 'standalone';
}
$type = isset($_GET['type']) ? $_GET['type'] : 'fotos';
$fv = new CFormValidator();
$fv->setForm('_group');
$fv->addElement('g_name', 'Name', '  - Please enter a name for your group.', 'length');
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_group');
$fv->setJavascriptSubmit(true);
$fv->validate();
?>

<div style="width:545px; text-align:left;">
  <form action="/?action=fotobox.group_form.act" method="post" name="_group" style="display:inline;">
    <input type="hidden" name="g_public" value="0" />
    
    <div class="bold">
      <span class="f_off_accent">Step 1</span> Name your Group
    </div>
    <div style="padding-left:10px;">
コード例 #10
0
<?php

$fl =& CFlix::getInstance();
$key = $_GET['KEY'];
$slideshowData = $fl->search(array('KEY' => $key));
$fotoURL = dynamicImage($slideshowData['US_PHOTO']['thumbnailPath_str'], $slideshowData['US_PHOTO']['photoKey_str'], 150, 100);
$fv = new CFormValidator();
$fv->setForm('_emailSlideshow');
$fv->addElement('to', 'Recipient Email(s)', '  - Please enter at least one recipient\'s email address.', 'length');
$fv->addElement('from', 'Your Email', '  - Please enter your email address.', 'email');
$fv->addElement('subject', 'Subject', '  - Please enter a subject.', 'length');
$fv->addElement('message', 'Message', '  - Please enter a message.', 'length');
$fv->setMaxElementsToDisplay(5);
$fv->setDebugOutput(false);
$fv->setFunctionName('_validate');
$fv->validate();
if (isset($_GET['confirmation'])) {
    echo '<div class="center f_12 bold" style="margin-bottom:10px;"><img src="images/icons/checkmark_16x16.png" border="0" width="16" height="16" class="png" align="absmiddle" /> Your email has been sent</div>';
}
$swfPath = 'http://' . FF_SERVER_NAME . '/swf/container/dynamic/container_' . $slideshowData['US_WIDTH'] . '_' . $slideshowData['US_HEIGHT'] . '.swf?slideshowKey_str=' . $slideshowData['US_KEY'] . '&version=' . FF_VERSION_TEMPLATE . '&timestamp=' . NOW;
?>


<div style="width:400px; text-align:left;" class="margin-auto">
  <div style="padding-bottom:10px; padding-top:10px;" class="f_12 bold">Share Your Slideshow</div>
  <div style="margin-bottom:10px;" class="flix_border_medium"><img src="<?php 
echo $fotoURL;
?>
" width="150" height="100" border="0" /></div>
  
  <div class="f_8 bold"><a href="javascript:void(0);" onclick="effLink.toggle(); $('_linkCodeResult').select();" class="plain"><img src="images/icons/document_16x16.png" class="png" width="16" height="16" border="0" align="absmiddle" /> Copy/paste slideshow link</a></div>
コード例 #11
0
ファイル: ci_home_page.dsp.php プロジェクト: jmathai/photos
// variables from the first page
$username = $_POST['ci_username'];
$password = $_POST['ci_password'];
$nameFirst = $_POST['ci_name_first'];
$nameLast = $_POST['ci_name_last'];
$email = $_POST['ci_email'];
$paymentType = $_POST['ci_payment_type'];
$street1 = $_POST['ci_street_1'];
$street2 = $_POST['ci_street_2'];
$country = $_POST['ci_country'];
$city = $_POST['ci_city'];
$state = $_POST['ci_state'];
$zip = $_POST['ci_zip'];
$acceptAgreement = 'true';
$fv = new CFormValidator();
$fv->setForm('_ciRegistration');
$fv->addElement('ci_category_type', 'How would you describe yourself as a photographer', '  - Please choose a category.', 'selectboxnull');
$fv->addElement('ci_public_name', 'Public Name', '  - Please must enter a public name.', 'length');
$fv->addElement('ci_camera_make', 'Digital Camera Make', '  - Please select a camera make.', 'selectboxnull');
$fv->addElement('ci_camera_model', 'Digital Camera Model', '  - Please enter a camera model.', 'length');
$fv->addElement('ci_camera_resolution', 'Digital Camera Resolution', '  - Please enter your camera resolution.', 'selectboxnull');
$fv->setMaxElementsToDisplay(10);
$fv->setDebugOutput(false);
$fv->setFunctionName('_val_registration');
$fv->validate();
$categoryArr = array('Amateur', 'Hobbyist', 'Prosumer', 'Professional');
$categoryTypes = '<select name="ci_category_type" id="ci_category_type" class="formfield">';
foreach ($categoryArr as $v) {
    $categoryTypes .= '<option value="' . $v . '">' . $v . '</option>';
}
$categoryTypes .= '</select>';
コード例 #12
0
     if ($logged_in === false) {
         // capture if the user is not logged in (and has a recurring payment)
         // the user must have been redirected from the login.act.php page
         $type = 'capture';
         echo '
       <div class="bold center" style="padding-bottom:15px;">
         <img src="/images/icons/warning_alt_2_16x16.png" class="png" width="16" height="16" border="0" align="absmiddle" />&nbsp;Your account has expired.  Please update your billing information to re-activate your account.
       </div>
   ';
     } else {
         // if the user is logged in and has a recurring payment then do not capture
         $type = 'nocapture';
     }
 }
 $fv = new CFormValidator();
 $fv->setForm('updateBilling');
 $fv->addElement('er_ccNameFirst', 'First Name', '  - Please enter your first name.', 'length');
 $fv->addElement('er_ccNameLast', 'Last Name', '  - Please enter your last name.', 'length');
 $fv->addElement('er_ccStreet', 'Address', '  - Please enter your address.', 'length');
 $fv->addElement('er_ccCity', 'City', '  - Please enter your city.', 'length');
 $fv->addElement('er_ccState', 'State', '  - Please select your state.', 'selectboxnull');
 $fv->addElement('er_ccZip', 'Zip', '  - Please enter your zipcode.', 'length');
 $fv->addElement('er_ccNum', 'Credit Card Number', '  - Please check make sure you typed your credit card number in correctly.', 'mod10');
 $fv->addElement('er_ccExpMonth', 'Expiration Month', '  - Please enter the month your credit card expires.', 'length');
 $fv->addElement('er_ccExpYear', 'Expiration Year', '  - Please enter the year your credit card expires.', 'length');
 $fv->addElement('er_ccCcv', 'Credit Card Verification Number', '  - Please enter the 3 digit CCV number on the back of your card.', 'length');
 $fv->setMaxElementsToDisplay(5);
 $fv->setDebugOutput(false);
 $fv->setFunctionName('_val_process');
 $fv->setJavascriptSubmit(false);
 $fv->validate();
コード例 #13
0
ファイル: video_upload.frm.php プロジェクト: jmathai/photos
<?php

if (permission($_FF_SESSION->value('account_perm'), PERM_USER_1) === true) {
    $u =& CUser::getInstance();
    $v =& CVideo::getInstance();
    $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>';
    }
コード例 #14
0
ファイル: music_home.dsp.php プロジェクト: jmathai/photos
<?php

$error = !empty($_GET['error']) ? $_GET['error'] : false;
switch ($error) {
    case 'FILE_EXISTS':
        $errorMessage = 'A file with this name already exists';
        break;
    default:
        $errorMessage = 'Unknown error';
        break;
}
$fv = new CFormValidator();
$fv->setForm('_music');
$fv->addElement('m_swf_src', 'Music Source', '  - Must specify a music source', 'length');
//$fv -> addElement('m_tempo', 'Tempo', '  - Must specify a tempo', 'length');
$fv->addElement('m_name', 'Name', '  - Must specify a name', 'length');
//$fv -> addElement('m_description', 'Description', '  - Must specify a description', 'length');
$fv->setMaxElementsToDisplay(4);
$fv->setDebugOutput(false);
$fv->setFunctionName('_validate');
$fv->validate();
$genre = array('My Music', 'Holiday', 'Classical', 'Country', 'Pop/Rock', 'Jazz/Blues', 'Romantic', 'Drama/Suspense', 'Children/Cartoon', 'Easy Listening', 'World', 'Solo Instrument', 'Ambience', 'Drums');
$genreOptions = '<select name="m_genre" class="formfield">';
foreach ($genre as $v) {
    $genreOptions .= '<option value="' . $v . '">' . $v . '</option>';
}
$genreOptions .= '</select>';
?>

<form name="_music" method="POST" action="/cp/?action=music.home.act" onsubmit="return _validate();" />
  <div style="margin-left:50px; margin-top:25px;">
コード例 #15
0
ファイル: beta_request.dsp.php プロジェクト: jmathai/photos
<?php

$fv = new CFormValidator();
$fv->setForm('_beta');
$fv->addElement('be_email', 'Email', '  - Please enter an email address.', 'email');
$fv->setDebugOutput(false);
$fv->setFunctionName('_validate');
$fv->validate();
?>

<div class="center">
  <div style="padding-top:10px;" class="f_12 bold">Photagious is currently accepting beta testers</div>
  <div style="padding-top:25px;">If you would like to be a beta tester for Photagious please enter your email address below</div>
  <div id="_hideBeta" style="padding-top:10px; display:block;">
    <form name="_beta" onsubmit="if(_validate()) { betaEmail($('be_email').value); } return false;">
      <input type="text" name="be_email" id="be_email" size="35" class="formfield" />
      <a href="javascript:void(0);" onclick="if(_validate()) { betaEmail($('be_email').value); }"><img src="images/icons/send_mail_24x24.png" class="png" width="24" height="24" border="0" hspace="5" align="absmiddle" style="margin-top:-5px;" /></a>
    </form>
  </div>
  <div id="thankYou" style="padding-top:20px; display:none;" class="f_10 bold">Thank you for your interest.  If you are selected you will receive an email when testing begins.</div>
</div>

<script type="text/javascript">
  $('be_email').focus();
</script>
コード例 #16
0
ファイル: mp3_upload.frm.php プロジェクト: jmathai/photos
$fv =& new CFormValidator();
$sess_id = md5($_USER_ID . NOW);
if ($args[0] == 'mp3_upload_form') {
    $update = false;
    $user_enc = $u->userIdEnc($_USER_ID);
    $formAction = FF_ENVIORNMENT == 'production' ? "/cgi-bin/upload_mp3.cgi?sessionid={$sess_id}&user_enc={$user_enc}" : '/?action=fotobox.mp3_upload_finalize.act';
} else {
    if ($args[0] == 'mp3_update_form' && isset($args[1])) {
        $fb =& CFotobox::getInstance();
        $mp3_data = $fb->mp3($args[1], $_USER_ID);
        $update = true;
        $formAction = '/?action=fotobox.mp3_update.act';
    }
}
$fv = new CFormValidator();
$fv->setForm('_uploader');
$fv->addElement('um_name', 'Name', '  - Enter a name for your MP3.', 'length');
$fv->setDebugOutput(false);
$fv->setFunctionName('_mp3Submit');
$fv->setJavascriptSubmit(true);
?>

<script language="javascript">
  function uploaderCover()
  {
    _toggle('uploaderCover');
  }
</script>

<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>