public static function display() { // Display the contact form on the template if (isset($_POST['submit_contact'])) { if (\PFBC\Form::isValid($_POST['submit_contact'])) { new ContactFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_contact', 400); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_contact', 'form_contact')); $oForm->addElement(new \PFBC\Element\Token('contact')); $oForm->addElement(new \PFBC\Element\Textbox(t('Your First Name:'), 'first_name', array('id' => 'str_first_name', 'onblur' => 'CValid(this.value, this.id,2,20)', 'title' => t('Enter your first name.'), 'required' => 1, 'validation' => new \PFBC\Validation\Str(2, 20)))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_first_name"></span>')); $oForm->addElement(new \PFBC\Element\Textbox(t('Your Last Name:'), 'last_name', array('id' => 'str_last_name', 'onblur' => 'CValid(this.value, this.id,2,20)', 'title' => t('Enter your last name.'), 'required' => 1, 'validation' => new \PFBC\Validation\Str(2, 20)))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_last_name"></span>')); $oForm->addElement(new \PFBC\Element\Email(t('Your Email:'), 'mail', array('id' => 'email', 'onblur' => 'CValid(this.value, this.id)', 'title' => t('Enter your valid email address.'), 'required' => 1))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error email"></span>')); $oForm->addElement(new \PFBC\Element\Phone(t('Your Phone Number:'), 'phone', array('id' => 'phone', 'onblur' => 'CValid(this.value, this.id)', 'title' => t('Enter full phone number with area code.')))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error phone"></span>')); $oForm->addElement(new \PFBC\Element\Url(t('Your Website:'), 'website', array('id' => 'url', 'onblur' => 'CValid(this.value, this.id)', 'title' => t('If you have a website, please enter your site address.')))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error url"></span>')); $oForm->addElement(new \PFBC\Element\Textbox(t('Your Subject:'), 'subject', array('id' => 'str_subject', 'onblur' => 'CValid(this.value, this.id,4,25)', 'title' => t('Enter the subject of the message.'), 'required' => 1, 'validation' => new \PFBC\Validation\Str(4, 25)))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_subject"></span>')); $oForm->addElement(new \PFBC\Element\Textarea(t('Your Message:'), 'message', array('id' => 'str_message', 'onblur' => 'CValid(this.value, this.id,10,1500)', 'title' => t('Enter your message.'), 'required' => 1, 'validation' => new \PFBC\Validation\Str(10, 1500)))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_message"></span>')); $oForm->addElement(new \PFBC\Element\CCaptcha(t('Captcha:'), 'captcha', array('id' => 'ccaptcha', 'onkeyup' => 'CValid(this.value, this.id)', 'title' => t('Enter the code above.')))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error ccaptcha"></span>')); $oForm->addElement(new \PFBC\Element\Button(t('Contact US'), 'submit', array('icon' => 'contact'))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<script src="' . PH7_URL_STATIC . PH7_JS . 'validate.js"></script>')); $oForm->render(); }
public function __construct() { parent::__construct(); if (!AdminCore::auth()) { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(PH7_URL_ROOT, $this->adminSignInMsg(), 'error'); } }
/** * Set the reference to the visitor. * * @return void */ public function refer() { if ($this->httpRequest->getExists('aff')) { if ((new ExistsCoreModel())->username($this->httpRequest->get('aff'), 'Affiliates')) { (new Affiliate())->addRefer($this->httpRequest->get('aff')); } } Framework\Url\Header::redirect($this->registry->site_url . $this->httpRequest->get('action')); }
public function __construct() { parent::__construct(); if (!UserCore::auth() && $this->registry->controller !== 'AdminController') { $this->signUpRedirect(); } if (!AdminCore::auth() && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('payment', 'main', 'index'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); // This module is available only to members if (!UserCore::auth() && !AdminCore::auth()) { $this->signInRedirect(); } if (!AdminCore::auth() && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('user', 'main', 'login'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); $bAdminAuth = AdminCore::auth(); if (!$bAdminAuth) { if (!$this->checkMembership() || !$this->group->games_access) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('game', 'main', 'index'), $this->adminSignInMsg(), 'error'); } }
public static function display() { if (isset($_POST['submit_add_fake_profiles'])) { if (\PFBC\Form::isValid($_POST['submit_add_fake_profiles'])) { new AddFakeProfilesFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_add_fake_profiles', 550); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_add_fake_profiles', 'form_add_fake_profiles')); $oForm->addElement(new \PFBC\Element\Token('fake_profiles')); $oForm->addElement(new \PFBC\Element\Select(t('Number:'), 'num', array('1', '5', '10', '15'), array('description' => t('Number of fake profiles to add in the same time.'), 'required' => 1))); $oForm->addElement(new \PFBC\Element\Button(t('Add Fake Profiles!'))); $oForm->render(); }
public static function display() { if (isset($_POST['submit_admin_ads'])) { if (\PFBC\Form::isValid($_POST['submit_admin_ads'])) { new AdsAdminFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_admin_ads', 500); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_admin_ads', 'form_admin_ads')); $oForm->addElement(new \PFBC\Element\Token('admin_ads')); $oForm->addElement(new \PFBC\Element\Textbox(t('Title'), 'title', array('required' => 1, 'validation' => new \PFBC\Validation\Str(2, 20)))); $oForm->addElement(new \PFBC\Element\Textarea(t('Advertisement'), 'code', array('required' => 1))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public static function display() { if (isset($_POST['submit_file'])) { if (\PFBC\Form::isValid($_POST['submit_file'])) { new PublicFileFormProcess(); } Framework\Url\Header::redirect(); } $rData = file_get_contents(PH7_PATH_ROOT . $_GET['file']); $oForm = new \PFBC\Form('form_file', '100%'); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_file', 'form_file')); $oForm->addElement(new \PFBC\Element\Token('file')); $oForm->addElement(new \PFBC\Element\Textarea(t('File Content'), 'content', array('value' => $rData, 'style' => 'height:650px', 'required' => 1))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public static function display() { if (isset($_POST['submit_picture_album'])) { if (\PFBC\Form::isValid($_POST['submit_picture_album'])) { new AlbumFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_picture_album', 500); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_picture_album', 'form_picture_album')); $oForm->addElement(new \PFBC\Element\Token('album')); $oForm->addElement(new \PFBC\Element\Textbox(t('Name of your album:'), 'name', array('required' => 1, 'validation' => new \PFBC\Validation\Str(2, 40)))); $oForm->addElement(new \PFBC\Element\Textarea(t('Description of your album:'), 'description', array('validation' => new \PFBC\Validation\Str(2, 200)))); $oForm->addElement(new \PFBC\Element\File(t('Thumb of the your album'), 'album', array('accept' => 'image/*', 'required' => 1))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public static function display() { if (isset($_POST['submit_delete_account'])) { if (\PFBC\Form::isValid($_POST['submit_delete_account'])) { new DeleteUserCoreFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_delete_account', 500); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_delete_account', 'form_delete_account')); $oForm->addElement(new \PFBC\Element\Token('delete_account')); $oForm->addElement(new \PFBC\Element\Password(t('Your Password:'******'password', array('required' => 1))); $oForm->addElement(new \PFBC\Element\Textarea(t('Reason:'), 'message', array('description' => t('Please be specific in your reason. This will hep us to improve our service and make it the best social service for you.'), 'required' => 1, 'validation' => new \PFBC\Validation\Str(5, 500)))); $oForm->addElement(new \PFBC\Element\Radio(t('Why:'), 'why_delete', array(t('I do not like the site'), t('I met someone'), t('Other, I put the answer in the message!')), array('required' => 1))); $oForm->addElement(new \PFBC\Element\CCaptcha(t('Captcha:'), 'captcha', array('description' => t('Enter the code above')))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public static function display() { if (isset($_POST['submit_msg'])) { if (\PFBC\Form::isValid($_POST['submit_msg'])) { new MsgFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_msg', 650); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_msg', 'form_msg')); $oForm->addElement(new \PFBC\Element\Token('msg')); $oForm->addElement(new \PFBC\Element\HTMLExternal('<p class="center italic bold">' . t('ATTENTION! Sending emails may take several tens of minutes/hours.') . '<br />' . t('Once the form is sent, do not close the browser page!') . '</p>')); $oForm->addElement(new \PFBC\Element\Checkbox('', 'only_subscribers', array('1' => t('Only subscribers to the newsletter:')))); $oForm->addElement(new \PFBC\Element\Textbox(t('Subject:'), 'subject', array('validation' => new \PFBC\Validation\Str(5, 80), 'required' => 1))); $oForm->addElement(new \PFBC\Element\CKEditor(t('Body:'), 'body', array('required' => 1))); $oForm->addElement(new \PFBC\Element\Button(t('Send!'), 'submit')); $oForm->render(); }
public function __construct() { parent::__construct(); $bAdminAuth = AdminCore::auth(); if (!UserCore::auth() && !$bAdminAuth) { $this->signInRedirect(); } if (!$bAdminAuth) { if (!$this->checkMembership() || $this->registry->action === 'inbox' && !$this->group->read_mails) { $this->paymentRedirect(); } elseif ($this->registry->action === 'compose' && !$this->group->send_mails) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('user', 'main', 'login'), $this->adminSignInMsg(), 'error'); } }
public static function display() { if (isset($_POST['submit_import_user'])) { if (\PFBC\Form::isValid($_POST['submit_import_user'])) { new ImportUserFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_import_user', 550); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\HTMLExternal('<p>' . t('Import members into your site from a <strong><abbr title="Comma Separated Values">CSV</abbr></strong> file. You can find database users <strong><a href="%0%">here</a></strong>.', 'http://www.saledatingprofiles.com/?from=ph7cms.com') . '</p>')); $oForm->addElement(new \PFBC\Element\Hidden('submit_import_user', 'form_import_user')); $oForm->addElement(new \PFBC\Element\Token('import_user')); $oForm->addElement(new \PFBC\Element\File(t('CSV file:'), 'csv_file', array('accept' => '.csv', 'required' => 1))); $oForm->addElement(new \PFBC\Element\Select(t('Delimiter:'), 'delimiter', array(',', ';', '|'), array('required' => 1))); $oForm->addElement(new \PFBC\Element\Select(t('Enclosure:'), 'enclosure', array('"', '/'), array('required' => 1))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public static function display() { if (isset($_POST['submit_ads'])) { if (\PFBC\Form::isValid($_POST['submit_ads'])) { new AdsFormProcess(); } Framework\Url\Header::redirect(); } $aAdSizes = PH7_PATH_APP_CONFIG . 'ad_sizes.php'; $oForm = new \PFBC\Form('form_ads', 500); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_ads', 'form_ads')); $oForm->addElement(new \PFBC\Element\Token('ads')); $oForm->addElement(new \PFBC\Element\Textbox(t('Title:'), 'title', array('required' => 1, 'validation' => new \PFBC\Validation\Str(2, 40)))); $oForm->addElement(new \PFBC\Element\Select(t('Size of the Banner:'), 'size', $aAdSizes, array('required' => 1))); $sText = AdsCore::getTable() == 'AdsAffiliates' ? t('The predefined variable for the URL of an affiliate account to put in the HTML is: %0%.', '<strong>#!%affiliate_url%!#</strong>') : t('The predefined variable to the URL of your site to indicate this in the HTML is: %0%.', '<strong>#!%site_url%!#</strong>'); $oForm->addElement(new \PFBC\Element\Textarea(t('Banner:'), 'code', array('description' => $sText, 'required' => 1))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public static function display() { if (isset($_POST['submit_change_password'])) { if (\PFBC\Form::isValid($_POST['submit_change_password'])) { new ChangePasswordCoreFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_change_password', 500); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_change_password', 'form_change_password')); $oForm->addElement(new \PFBC\Element\Token('change_password')); $oForm->addElement(new \PFBC\Element\Password(t('Old password:'******'old_password', array('required' => 1))); $oForm->addElement(new \PFBC\Element\Password(t('New password:'******'new_password', array('id' => 'password', 'onkeyup' => 'checkPassword(this.value)', 'onblur' => 'CValid(this.value, this.id)', 'required' => 1, 'validation' => new \PFBC\Validation\Password()))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error password"></span>')); $oForm->addElement(new \PFBC\Element\Password(t('Repeat new password:'******'new_password2', array('required' => 1))); $oForm->addElement(new \PFBC\Element\Button(t('Change Password!'), 'submit', array('icon' => 'key'))); $oForm->addElement(new \PFBC\Element\HTMLExternal('<script src="' . PH7_URL_STATIC . PH7_JS . 'validate.js"></script>')); $oForm->render(); }
public function __construct() { parent::__construct(); // Level for Notes $bAdminAuth = AdminCore::auth(); if (!UserCore::auth() && ($this->registry->action === 'add' || $this->registry->action === 'edit' || $this->registry->action === 'delete')) { $this->signUpRedirect(); } if (!$bAdminAuth) { if (!$this->checkMembership() || $this->registry->action === 'read' && !$this->group->read_notes) { $this->paymentRedirect(); } elseif ($this->registry->action === 'add' && !$this->group->write_notes) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('blog', 'main', 'index'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); /***** Levels for the forums *****/ $bAdminAuth = AdminCore::auth(); if (!UserCore::auth() && !$bAdminAuth && ($this->registry->action === 'addtopic' || $this->registry->action === 'edittopic' || $this->registry->action === 'deletetopic' || $this->registry->action === 'reply' || $this->registry->action === 'editmessage' || $this->registry->action === 'deletemessage')) { $this->signInRedirect(); } if (!$bAdminAuth) { if (!$this->checkMembership() || !$this->group->forum_access) { $this->paymentRedirect(); } elseif ($this->registry->action === 'addtopic' && !$this->group->create_forum_topics) { $this->paymentRedirect(); } elseif ($this->registry->action === 'reply' && !$this->group->answer_forum_topics) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('forum', 'forum', 'index'), $this->adminSignInMsg(), 'error'); } }
public static function display() { if (isset($_POST['submit_add_admin'])) { if (\PFBC\Form::isValid($_POST['submit_add_admin'])) { new AddAdminFormProcess(); } Framework\Url\Header::redirect(); } $oForm = new \PFBC\Form('form_add_admin', 550); $oForm->configure(array('action' => '')); $oForm->addElement(new \PFBC\Element\Hidden('submit_add_admin', 'form_add_admin')); $oForm->addElement(new \PFBC\Element\Token('add_admin')); $oForm->addElement(new \PFBC\Element\Username(t('Username:'******'username', array('required' => 1, 'validation' => new \PFBC\Validation\Username('Admins')))); $oForm->addElement(new \PFBC\Element\Email(t('Login Email:'), 'mail', array('required' => 1, 'validation' => new \PFBC\Validation\CEmail('guest', 'Admins')))); $oForm->addElement(new \PFBC\Element\Password(t('Password:'******'password', array('required' => 1))); $oForm->addElement(new \PFBC\Element\Textbox(t('First Name:'), 'first_name', array('required' => 1, 'validation' => new \PFBC\Validation\Str(2, 20)))); $oForm->addElement(new \PFBC\Element\Textbox(t('Last Name:'), 'last_name', array('required' => 1, 'validation' => new \PFBC\Validation\Str(2, 20)))); $oForm->addElement(new \PFBC\Element\Radio(t('Sex:'), 'sex', array('female' => t('Female'), 'male' => t('Male'), 'couple' => t('Couple')), array('required' => 1))); $oForm->addElement(new \PFBC\Element\Timezone('Time Zone:', 'time_zone', array('description' => t('With your time zone, the other administrators may know when they can contact you easily.'), 'value' => '-6', 'required' => 1))); $oForm->addElement(new \PFBC\Element\Button()); $oForm->render(); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get(PH7_ADMIN_MOD, 'info', 'software')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('user', 'search', 'quick')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get(PH7_ADMIN_MOD, 'file', 'display')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('mail', 'admin', 'msglist')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get(PH7_ADMIN_MOD, 'account', 'edit')); }