public static function showBanner($group, $banner = '') { if (!config::item('plugins', 'core', 'banners') || !session::permission('banners_show', 'banners')) { return ''; } loader::model('banners/banners'); $banner = codebreeder::instance()->banners_model->getBanner($banner, $group); if (!$banner || input::protocol() == 'https' && !$banner['secure_mode']) { return ''; } if ($banner['count_views']) { codebreeder::instance()->banners_model->updateViews($banner['banner_id']); } if ($banner['count_clicks']) { $banner['code'] = '<div style="display:block" onclick="$(\'#banner_id_' . $banner['banner_id'] . '\').attr(\'src\',\'' . html_helper::siteURL('banners/click/' . $banner['banner_id']) . '\');return true;">' . $banner['code'] . '<img src="' . html_helper::baseURL('assets/images/banners/blank.gif') . '" border="0" style="width:0px;height:0px;" alt="" id="banner_id_' . $banner['banner_id'] . '" /></div>'; } return $banner['code']; }
stopAjax('actions_link_save', 'icon-system-ajax'); $('#actions li').show(); $('#actions_link_save').parent().hide(); $('#actions_link_cancel').parent().hide(); $('#browse_box').html(response); } ); } function cancelSortable() { startAjax('actions_link_cancel', 'icon-system-ajax'); $.post('<?php echo html_helper::siteURL('cp/system/templates/navigation/view/' . $listID); ?> ', {'view':'grid'}, function(response) { stopAjax('actions_link_cancel', 'icon-system-ajax'); $('#actions li').show(); $('#actions_link_save').parent().hide(); $('#actions_link_cancel').parent().hide(); $('#browse_box').html(response); } ); } $(function(){
<h2 class="c_title">Email Registration</h2> <div class="reg-bar"> <ul class="clearfix"> <li class="current li-0">Email Registration</li> <li class="li-1">Email Verification</li> <li class="li-2">Profile Creation</li> <li class="li-3">Profile Confirmation</li> <li class="li-4">Registration Finish</li> </ul> </div> <p>Your registration to TutorNavi membership is FREE !</p> <h3>Email Registration</h3> <p>Welcome to TutorNavi!Please enter your email address below, then click “Send” button.You will get an email from us.</p> <p>Follow email instructions to complete membership registration.</p> <form class="form1" action="<?php echo html_helper::siteURL('users/signup/step1'); ?> " method='POST'> <div class="box clearfix"> <span class="note">Must Enter</span> <span>PC Email Address</span> <input type="email" class="mail" name='email' placeholder="Please enter your email address here"/> <input type='hidden' value='1' name='reg_step1'> <span>eg):akiko@yahoo.co.jp</span> <p class='error'><?php echo isset($error) ? $error : ''; ?> </p> </div> <div class="btn-wrap"> <input type="submit" id="send" value="Send" />
runtimes : 'html5,flash,silverlight', browse_button : 'uploader-browse', container : 'uploader-container', max_file_size : '<?php echo $maxsize; ?> mb', <?php if ($limit == 1) { ?> multi_selection : false, <?php } ?> url : '<?php echo html_helper::siteURL($action); ?> ?ajax=true', flash_swf_url : '<?php echo html_helper::baseURL(); ?> externals/plupload/plupload.flash.swf', silverlight_xap_url : '<?php echo html_helper::baseURL(); ?> externals/plupload/plupload.silverlight.xap', filters : [ {title : "Files", extensions : "<?php echo $extensions; ?> "}
<!DOCTYPE html> <html <?php echo input::isAjaxRequest() || input::get('modal') ? 'class="modal"' : ''; ?> > <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo view::getMetaTitle() ? view::getMetaTitle() . (uri::getURI() != '' ? ' - ' : '') : ''; echo uri::getURI() != '' ? text_helper::entities(config::item('site_title', 'system')) : ''; ?> </title> <?php echo html_helper::style(html_helper::siteURL('load/css/' . session::item('template'))); echo view::getStylesheets(); echo html_helper::script(html_helper::siteURL('load/javascript')); echo view::getJavascripts(); ?> <meta name="description" content="<?php echo view::getMetaDescription(); ?> " /> <meta name="keywords" content="<?php echo view::getMetaKeywords(); ?> " /> </head> <body <?php echo input::isAjaxRequest() || input::get('modal') ? 'class="modal"' : ''; ?> >
}, {}, 'counters-update-spinner' ); } else { window.location = '<?php echo html_helper::siteURL('cp/utilities/counters'); ?> '; } } else { window.location = '<?php echo html_helper::siteURL('cp/utilities/counters'); ?> /' + redirect; } } $(function(){ setTimeout(function() { updateDbCounters('<?php echo $redirect; ?> ', true); }, 500); }); </script> <?php view::load('cp/system/elements/template/footer');
"> <span class="icon icon-system-ajax ajax" id="ajax-rating-<?php echo $resource; ?> -<?php echo $itemID; ?> " style="display:none"></span> <?php for ($i = 1; $i <= 5; $i++) { ?> <a class="star star-<?php echo $i; ?> " href="#" onclick="submitVote('<?php echo html_helper::siteURL('comments/vote'); ?> ',{'resource':'<?php echo $resource; ?> ','item_id':'<?php echo $itemID; ?> ','score':'<?php echo $i; ?> '});return false;" data-tooltip="default" title="<?php echo __('rating_' . $i, 'system_info'); ?> "></a> <?php
} else { window.location = '<?php echo html_helper::siteURL('cp/content/newsletters'); ?> '; } }, {}, 'newsletters-update-spinner' ); } else { window.location = '<?php echo html_helper::siteURL('cp/content/newsletters/send/' . $newsletterID); ?> /' + redirect; } } $(function(){ setTimeout(function() { sendNewsletter('<?php echo $redirect; ?> ', true); }, 500); }); </script> <?php view::load('cp/system/elements/template/footer');
public function getManifest() { $params = array('name' => 'Twitter', 'description' => 'Twitter authentication library.', 'settings' => array(array('name' => 'Consumer key', 'keyword' => 'consumer_key', 'type' => 'text', 'class' => 'input-large', 'required' => true, 'value' => ''), array('name' => 'Consumer secret', 'keyword' => 'consumer_secret', 'type' => 'text', 'class' => 'input-large', 'required' => true, 'value' => ''), array('name' => 'Callback URL', 'keyword' => 'callback_url', 'type' => 'static', 'value' => html_helper::siteURL('users/connect/confirm/twitter')))); return $params; }
</section> <?php if (config::item('templates_active', 'messages') && $templates) { ?> <script type="text/javascript"> function selectMessageTemplate(templateID) { if ( $('#input_edit_message_edit_subject').val() == '' && $('#input_edit_message_edit_message').val() == '' || confirm('<?php echo __('message_template_overwrite', 'messages', array('\'' => '\\\''), array(), false); ?> ') ) { runAjax('<?php echo html_helper::siteURL('messages/template'); ?> /'+templateID, {}, function(message){ $('#input_edit_message_edit_subject').val(message.subject); $('#input_edit_message_edit_message').val(message.message); }, null, 'ajax-messages-template-'+templateID, 'icon-system-ajax' ); } } </script> <?php } ?>
public function getForm($invoiceID, $name, $amount, $cancel, $success) { $params = array('cmd' => '_xclick', 'quantity' => '1', 'no_note' => '1', 'no_shipping' => '1', 'rm' => '2', 'charset' => 'utf8', 'business' => $this->config['email'], 'item_name' => $name, 'item_number' => $invoiceID, 'amount' => $amount, 'currency_code' => strtoupper(config::item('currency', 'billing')), 'cancel_return' => html_helper::siteURL($cancel), 'return' => html_helper::siteURL($success), 'notify_url' => html_helper::siteURL('billing/payments/ipn/paypal')); $form = ($this->config['test'] ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr') . '?' . http_build_query($params, '', '&'); return $form; }
stopAjax('actions_link_save', 'icon-system-ajax'); $('#actions li').show(); $('#actions_link_save').parent().hide(); $('#actions_link_cancel').parent().hide(); $('#browse_box').html(response); } ); } function cancelSortable() { startAjax('actions_link_cancel', 'icon-system-ajax'); $.post('<?php echo html_helper::siteURL('cp/billing/plans/browse'); ?> ', {'view':'grid'}, function(response) { stopAjax('actions_link_cancel', 'icon-system-ajax'); $('#actions li').show(); $('#actions_link_save').parent().hide(); $('#actions_link_cancel').parent().hide(); $('#browse_box').html(response); } ); } $(function(){
stopAjax('actions_link_save', 'icon-system-ajax'); $('#actions li').show(); $('#actions_link_save').parent().hide(); $('#actions_link_cancel').parent().hide(); $('#browse_box').html(response); } ); } function cancelSortable() { startAjax('actions_link_cancel', 'icon-system-ajax'); $.post('<?php echo html_helper::siteURL('cp/system/fields/' . $plugin . '/browse/' . $categoryID); ?> ', {'view':'grid'}, function(response) { stopAjax('actions_link_cancel', 'icon-system-ajax'); $('#actions li').show(); $('#actions_link_save').parent().hide(); $('#actions_link_cancel').parent().hide(); $('#browse_box').html(response); } ); } $(function(){
protected function _uploadPicture() { // Create rules $rules = array('file' => array('label' => __('file_select', 'system_files'), 'rules' => array('required_file' => 'file'))); // Assign rules validate::setRules($rules); // Validate form values if (!validate::run()) { return false; } // Thumbnails config $thumbs = array(array('suffix' => 'x'), array('dimensions' => config::item('picture_dimensions', 'users'), 'method' => 'preserve', 'suffix' => ''), array('dimensions' => config::item('picture_dimensions_p', 'users'), 'method' => 'crop', 'suffix' => 'p'), array('dimensions' => config::item('picture_dimensions_l', 'users'), 'method' => 'crop', 'suffix' => 'l'), array('dimensions' => config::item('picture_dimensions_t', 'users'), 'method' => 'crop', 'suffix' => 't')); // Upload picture if (!($fileID = $this->storage_model->upload('user', session::item('user_id'), 'file', 'jpg|jpeg|gif|png', config::item('picture_max_size', 'users'), config::item('picture_dimensions_max', 'users'), $thumbs))) { if (input::isAjaxRequest()) { view::ajaxError(config::item('devmode', 'system') ? $this->storage_model->getError() : __('file_upload_error', 'system_files')); } else { validate::setFieldError('file', config::item('devmode', 'system') ? $this->storage_model->getError() : __('file_upload_error', 'system_files')); } return false; } // Delete old picture if it exists if (session::item('picture_id')) { // Delete picture $this->users_model->deletePicture(session::item('user_id'), session::item('picture_id'), false); } // Save new picture ID if (!$this->users_model->savePicture(session::item('user_id'), $fileID)) { if (input::isAjaxRequest()) { view::ajaxError(__('save_error', 'system')); } else { validate::setFieldError('file', __('save_error', 'system')); return false; } } // Was this an ajax request? if (input::isAjaxRequest()) { view::ajaxResponse(array('redirect' => html_helper::siteURL(session::item('slug')))); } // Success view::setInfo(__('picture_uploaded', 'users_picture')); router::redirect(session::item('slug')); }
protected function _uploadPicture($adID, $ad) { // Create rules $rules = array('file' => array('label' => __('file_select', 'system_files'), 'rules' => array('required_file' => 'file'))); // Assign rules validate::setRules($rules); // Validate form values if (!validate::run()) { return false; } // Thumbnails config $thumbs = array(array('suffix' => 'x'), array('dimensions' => config::item('picture_dimensions', 'classifieds'), 'method' => 'preserve', 'suffix' => ''), array('dimensions' => config::item('picture_dimensions_t', 'classifieds'), 'method' => 'crop', 'suffix' => 't')); // Upload picture if (!($fileID = $this->storage_model->upload('classified_picture', session::item('user_id'), 'file', 'jpg|jpeg|gif|png', config::item('picture_max_size', 'classifieds'), config::item('picture_dimensions_max', 'classifieds'), $thumbs))) { if (input::isAjaxRequest()) { view::ajaxError(config::item('devmode', 'system') ? $this->storage_model->getError() : __('file_upload_error', 'system_files')); } else { validate::setFieldError('file', config::item('devmode', 'system') ? $this->storage_model->getError() : __('file_upload_error', 'system_files')); return false; } } // Extras $extra = array(); // Save picture file if (!($pictureID = $this->classifieds_pictures_model->savePictureFile($fileID, $adID, $ad, $extra))) { if (input::isAjaxRequest()) { view::ajaxError(__('save_error', 'system')); } else { validate::setFieldError('file', __('save_error', 'system')); return false; } } // Update current album counters $ad[session::permission('pictures_approve', 'classifieds') ? 'total_pictures' : 'total_pictures_i']++; // Update album's modification date $this->classifieds_model->updateModifyDate($adID); // Was this an ajax request? if (input::isAjaxRequest()) { //view::ajaxResponse(__('picture_uploaded', 'pictures')); view::ajaxResponse(array('redirect' => html_helper::siteURL('classifieds/pictures/index/' . $adID))); } // Success view::setInfo(__('picture_uploaded', 'classifieds')); router::redirect('classifieds/pictures/index/' . $adID); }
protected function _uploadPicture() { if (input::files('file')) { // Create rules $rules = array('file' => array('label' => __('file_select', 'system_files'), 'rules' => array('required_file' => 'file'))); // Assign rules validate::setRules($rules); // Validate form values if (!validate::run()) { return false; } // Resize config $thumbs = array(array('suffix' => 'x'), array('dimensions' => config::item('picture_dimensions', 'users'), 'method' => 'preserve', 'suffix' => ''), array('dimensions' => config::item('picture_dimensions_p', 'users'), 'method' => 'crop', 'suffix' => 'p'), array('dimensions' => config::item('picture_dimensions_l', 'users'), 'method' => 'crop', 'suffix' => 'l'), array('dimensions' => config::item('picture_dimensions_t', 'users'), 'method' => 'crop', 'suffix' => 't')); // Upload picture if (!($fileID = $this->storage_model->upload('user', 0, 'file', 'jpg|jpeg|gif|png', config::item('picture_max_size', 'users'), config::item('picture_dimensions_max', 'users'), $thumbs))) { if (input::isAjaxRequest()) { view::ajaxError(config::item('devmode', 'system') ? $this->storage_model->getError() : __('file_upload_error', 'system_files')); } else { validate::setFieldError('file', config::item('devmode', 'system') ? $this->storage_model->getError() : __('file_upload_error', 'system_files')); return false; } } // Delete old picture if it exists if (session::item('picture', 'signup', 'file_id')) { $this->storage_model->deleteFiles(session::item('picture', 'signup', 'file_id'), 5); } // Get file details $file = $this->storage_model->getFile($fileID); // Set user session data session::set(array('picture' => $file), '', 'signup'); // Was this an ajax request? if (input::isAjaxRequest()) { view::ajaxResponse(array('redirect' => html_helper::siteURL('users/signup/picture'))); } router::redirect('users/signup/picture'); } // Redirect to the next step $this->_nextStep(); }