Esempio n. 1
0
 public function index()
 {
     $this->data['valid_captcha'] = getCaptcha();
     $this->assets_css = array('reset.css', 'header_footer.css', 'style.css', 'component.css', 'meanmenu.css', 'responsiveslides.css', 'bootstrap.min.css', 'main.css', 'responsive.css', 'easy-responsive-tabs.css');
     $this->assets_js = array('my.script.min.js');
     $this->page_title = "Contact Us | General Tech Services LLC -" . STATIC_TITLE;
     $this->current_section = 'contactus';
     $this->render_page(strtolower(__CLASS__) . '/index', $this->data);
 }
 private function generateForm()
 {
     $this->form = "";
     $this->form .= '<form class="UsersOnlineApplicationsForm" ' . 'name="UsersOnlineApplicationsForm" ' . 'action="' . $this->urlHelper->getThisPage() . '" ' . 'method="post" accept-charset="UTF-8" autocomplete="on">';
     $this->form .= '<table class="UsersOnlineApplicationsFormTable" >';
     $fio = InputHelper::textBox('fio', 'fio', 'fio', 200, true, null);
     $this->form .= InputHelper::createFormRow($fio, true, 'Представьтесь');
     $phone = InputHelper::textBox('phone', 'phone', 'phone', 200, true, null);
     $this->form .= InputHelper::createFormRow($phone, true, 'Контактный номер');
     $message = InputHelper::textarea('message', 'message', 'message', 50000, false, null);
     $this->form .= InputHelper::createFormRow($message, false, 'Дополнительная информация');
     $captcha = InputHelper::textBox("captcha", "captcha", "captcha", 20, true, null);
     $this->form .= InputHelper::createFormRow($captcha, true, getCaptcha(120, 25));
     $this->form .= '</table>';
     $this->form .= '<center>';
     $this->form .= '<input class="UsersOnlineApplicationsFormSubmit" type="submit" name="UsersOnlineApplicationsFormSubmit" value="Перезвоните мне">';
     $this->form .= '</center>';
     $this->form .= '</form>';
 }
Esempio n. 3
0
function sendPoll($j)
{
    global $server;
    $html = browse("{$server}/poll.php");
    if (strstr($html, "PollCompletion.php")) {
        return false;
    }
    $reshtml = str_get_html($html);
    $fieldList = array();
    if ($reshtml && is_object($reshtml) && isset($reshtml->nodes)) {
        $input = $reshtml->find('input');
        $loop = count($input);
        for ($i = 0; $i < $loop; $i++) {
            $fieldList[$input[$i]->attr["name"]] = $input[$i]->attr["value"];
        }
        if (isset($fieldList["OptionChecked"])) {
            $fieldList["OptionChecked"] = 1;
        }
        // print_r($fieldList);
    }
    $fieldList2 = array();
    $html = browse("{$server}/poll.php", 1, $fieldList);
    if (!strstr($html, "location.href = '{$server}/PollResult")) {
        $reshtml = str_get_html($html);
        if ($reshtml && is_object($reshtml) && isset($reshtml->nodes)) {
            $input = $reshtml->find('input');
            $loop = count($input);
            for ($i = 0; $i < $loop; $i++) {
                $fieldList2[$input[$i]->attr["name"]] = $input[$i]->attr["value"];
            }
            if (isset($fieldList2["OptionChecked"])) {
                $fieldList2["OptionChecked"] = 1;
            }
            $fieldList2["response_field_single_char"] = getCaptcha();
            //print_r($fieldList2);
        }
        $html = browse("{$server}/poll.php", 1, $fieldList2);
    }
    echo "\nPOLL.{$j} POLL ANSWERED";
    return true;
}
Esempio n. 4
0
 public function getChangePasswordForm()
 {
     if (isset($_POST['changePasswordFormSubmit'])) {
         $this->updatePassword();
     }
     $form = '<form class="changePasswordForm" name="RegistrationForm" action="' . $this->urlHelper->getThisPage() . '" 
         method="post" accept-charset="UTF-8" autocomplete="on">';
     $form .= "<div class='message'>{$this->message}</div>";
     $form .= '<table class="changePasswordFormTable" >';
     $loginAndPasswordPatern = "loginAndPasswordPatern";
     // currentPassword
     $currentPassword = $this->inputHelper->paternPasswordBox("currentPassword", "currentPassword", "changePassword", 25, true, $this->localization->getText($loginAndPasswordPatern), "[A-Za-z0-9]{3,20}", null);
     $form .= $this->createLocalizationFormRow($currentPassword, true, 'currentPassword');
     // newPassword
     $newPassword = $this->inputHelper->paternPasswordBox("newPassword", "newPassword", "changePassword", 25, true, $this->localization->getText($loginAndPasswordPatern), "[A-Za-z0-9]{3,20}", null);
     $form .= $this->createLocalizationFormRow($newPassword, true, 'newPassword');
     // repeatNewPassword
     $repeatNewPassword = $this->inputHelper->paternPasswordBox("repeatNewPassword", "repeatNewPassword", "changePassword", 25, true, $this->localization->getText($loginAndPasswordPatern), "[A-Za-z0-9]{3,20}", null);
     $form .= $this->createLocalizationFormRow($repeatNewPassword, true, 'repeatNewPassword');
     // captcha
     $captcha = $this->inputHelper->textBox("captcha", "captcha", "changePassword", 20, true, null);
     $form .= $this->createFormRow($captcha, true, getCaptcha(120, 25));
     $form .= '</table>';
     $form .= '<input class="RegistrationFormButton" type="submit" name="changePasswordFormSubmit" value="' . $this->localization->getText("changePasswordFormButtonText") . '">';
     $form .= '</form>';
     return $form;
 }
					<div class="button-reset">
						<img src="img/contact/refresh.svg">
					</div>
					<div class="button-add">+</div>
					<div class="button-remove">-</div>
					<div class="wrapper-upload">
						<label class="wrapper-file-upload">
							Upload
							<input class="field field-file" type="file" name="uploads[]">
						</label>
						<span class="filename"></span>
					</div>
				</div>
				<div class="container-captcha">
                       <span class="captcha"><?php 
echo getCaptcha();
?>
</span>
                       <input class="field field-captcha" name="captcha" placeholder="Enter Captcha" required>
               </div>
				<input class="submit" type="submit" value="Submit">
			</form>
		</div>
	</section>

	<!-- Conatct Section Ends -->

	<!-- Footer Begins -->

	<div class="footer"></div>
Esempio n. 6
0
            if ($err === false) {
                alert('Successfully signed up; you can now log in.', 1);
                $signup_success = true;
                reset_attempts('login');
            } else {
                alert(htmlentities($err), -1);
            }
        }
    }
}
if (userAccess('u')) {
    echo "Currently logged in as <b>{$_SESSION['email']}</b>.";
} else {
    ?>

<table id="loginformtable"><tr>
	<td>
	<?php 
    echo generateForm(array('action' => 'login.php', 'method' => 'POST', 'autocomplete' => 'off'), array('<h2>Sign Up</h2>', array('prompt' => 'Email:', 'name' => 's_email', 'value' => isset($signup_success) ? '' : POST('s_email'), 'autofocus' => 'autofocus'), array('prompt' => 'Password:'******'name' => 's_pass', 'type' => 'password'), array('prompt' => 'Again:', 'name' => 's_confpass', 'type' => 'password'), 'Captcha:<br>' . getCaptcha(), array('name' => 'signup', 'type' => 'submit', 'value' => 'Sign Up')));
    ?>
	Register to gain access to all features of the site! To be added soon: question tracking, subjects, common words, etc.
	</td>
	<td>
	<?php 
    echo generateForm(array('action' => 'login.php', 'method' => 'POST'), array('<h2>Log In</h2>', array('prompt' => 'Email:', 'name' => 'email', 'value' => isset($signup_success) ? POST('s_email') : POST('email'), 'autofocus' => 'autofocus'), array('prompt' => 'Password:'******'name' => 'pass', 'type' => 'password'), '', array('name' => 'login', 'type' => 'submit', 'value' => 'Log In')));
    ?>
	</td>
</tr></table>
<script>if($('[name="email"]').val()​​​​​​​​​​​​​​​​​​​​​.trim().length>0)$('[name="pass"]').focus();</script>
<?php 
}
 public function getForm($count = null)
 {
     $out = '<form name="upload" action="' . $this->actionFile . '" method="POST" ENCTYPE="multipart/form-data">';
     $out .= $this->text;
     if ($count == null || $count < 2) {
         $out .= '<input type="file" name="userfile[]" ' . $this->multiple . ' accept="' . $this->accept . '"><br>';
     } else {
         $out .= "<br>";
         for ($i = 0; $i < $count; $i++) {
             $out .= '<input type="file" name="userfile[]" accept="' . $this->accept . '"><br>';
         }
     }
     $out .= getCaptcha(120, 25, "IMGLoadCaptcha");
     $out .= '<br><input type="text" class="captchaText" name="captcha" placeholder="Введите символы с картинки" value="">';
     $out .= '<br><input type="submit" name="upload" value="Загрузить изображение">';
     $out .= '</form>';
     return $out;
 }
 /**
  * Создание формы
  */
 private function createForm()
 {
     $urlHelper = new UrlHelper();
     $this->form = '';
     $this->form .= '<center>';
     $this->form .= 'Уважаемые пользователи, указанные вами<br>';
     $this->form .= '<i>ИМЯ</i>, <i>ФАМИЛИЯ</i>, <i>ТЕЛЕФОН</i> и <i>EMAIL</i><br>';
     $this->form .= '<b>НЕ ДОСТУПНЫ ДРУГИМ ПОЛЬЗОВАТЕЛЯМ</b>.<br><br>';
     $this->form .= '</center>';
     $this->form .= '<form class="RegistrationForm" name="RegistrationForm" action="' . $urlHelper->getThisPage() . '" 
         method="post" accept-charset="UTF-8" autocomplete="on">';
     $this->form .= '<center>';
     $this->form .= "<div class='message'>{$this->message}</div>";
     $this->form .= '<table class="RegistrationFormTable" >';
     // ferstName
     $namePatern = $this->localization->getText("namePatern");
     $ferstName = $this->inputHelper->paternTextBox("ferstName", "ferstName", "ferstName", 50, true, $namePatern, "[А-Яа-яЁёЙйЦцA-Za-z]{2,50}", $this->insertValue['ferstName']);
     $this->form .= $this->createLocalizationFormRow($ferstName, true, 'ferstName');
     // lastName
     $lastName = $this->inputHelper->paternTextBox("lastName", "lastName", "lastName", 50, true, $namePatern, "[А-Яа-яЁёЙйЦцA-Za-z]{2,50}", $this->insertValue['lastName']);
     $this->form .= $this->createLocalizationFormRow($lastName, true, 'lastName');
     // birthday
     $birthday = $this->inputHelper->paternTextBox("birthday", "birthday", "birthday", 10, true, "ГГГГ-ММ-ДД", "[0-9]{4}-[0-9]{2}-[0-9]{2}", $this->insertValue['birthday']);
     $this->form .= $this->createLocalizationFormRow($birthday, true, 'birthday', 'birthdayInfo');
     // sex
     $sexArray = array();
     $sexArray[0]['value'] = 1;
     $sexArray[0]['text'] = $this->localization->getText("male");
     $sexArray[1]['value'] = 0;
     $sexArray[1]['text'] = $this->localization->getText("female");
     $sex = $this->inputHelper->select('sex', 'sex', $sexArray, true, $this->insertValue['sex'] == null ? 1 : $this->insertValue['sex']);
     $this->form .= $this->createLocalizationFormRow($sex, true, 'sex');
     // city
     $cityPatern = $this->localization->getText("cityPatern");
     $city = $this->inputHelper->paternTextBox("city", "city", "city", 200, true, $cityPatern, "[А-ЯЁЦЙA-Z]{1}[а-яёцйa-z]{1,199}", $this->insertValue['city']);
     $this->form .= $this->createLocalizationFormRow($city, true, 'city');
     // login
     $loginAndPasswordPatern = "loginAndPasswordPatern";
     $login = $this->inputHelper->paternTextBox("login", "login", "login", 25, true, $this->localization->getText($loginAndPasswordPatern), "[A-Za-z0-9]{3,20}", $this->insertValue['login']);
     $this->form .= $this->createLocalizationFormRow($login, true, 'login', $loginAndPasswordPatern);
     // password
     $password = $this->inputHelper->paternPasswordBox("password", "password", "password", 25, true, $this->localization->getText($loginAndPasswordPatern), "[A-Za-z0-9]{3,20}", null);
     $this->form .= $this->createLocalizationFormRow($password, true, 'password', $loginAndPasswordPatern);
     // repeatPassword
     $repeatPassword = $this->inputHelper->paternPasswordBox("repeatPassword", "repeatPassword", "repeatPassword", 25, true, $this->localization->getText($loginAndPasswordPatern), "[A-Za-z0-9]{3,20}", null);
     $this->form .= $this->createLocalizationFormRow($repeatPassword, true, 'repeatPassword', $loginAndPasswordPatern);
     // email
     $email = $this->inputHelper->paternTextBox("email", "email", "email", 200, true, "*****@*****.**", "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\$", $this->insertValue['email']);
     $this->form .= $this->createLocalizationFormRow($email, true, 'email');
     // phone
     $phone = $this->inputHelper->paternTextBox("phone", "phone", "phone", 30, true, "+7(XXX)XXX-XX-XX", "^((8|\\+7)-?)?\\(?\\d{3,5}\\)?-?\\d{1}-?\\d{1}-?\\d{1}-?\\d{1}-?\\d{1}((-?\\d{1})?-?\\d{1})?\$", $this->insertValue['phone']);
     $this->form .= $this->createLocalizationFormRow($phone, true, 'phone');
     // aboutYourself
     $aboutYourself = $this->inputHelper->textarea("aboutYourself", "aboutYourself", "aboutYourself", 600, false, $this->insertValue['aboutYourself']);
     $this->form .= $this->createLocalizationFormRow($aboutYourself, false, 'aboutYourself');
     // icq
     $isq = $this->inputHelper->textBox('icq', 'icq', 'icq', 9, false, $this->insertValue['icq']);
     $this->form .= $this->createLocalizationFormRow($isq, false, 'icq');
     // skype
     $skype = $this->inputHelper->textBox('skype', 'skype', 'skype', 25, false, $this->insertValue['skype']);
     $this->form .= $this->createLocalizationFormRow($skype, false, 'skype');
     // vk
     $vk = $this->inputHelper->textBox('vk', 'vk', 'vk', 25, false, $this->insertValue['vk']);
     $this->form .= $this->createLocalizationFormRow($vk, false, 'vk');
     // odnoklasniki
     $odnoklasniki = $this->inputHelper->textBox('odnoklasniki', 'odnoklasniki', 'odnoklasniki', 25, false, $this->insertValue['odnoklasniki']);
     $this->form .= $this->createLocalizationFormRow($odnoklasniki, false, 'odnoklasniki');
     // google
     $google = $this->inputHelper->textBox('google', 'google', 'google', 25, false, $this->insertValue['google']);
     $this->form .= $this->createLocalizationFormRow($google, false, 'google');
     // facebook
     $facebook = $this->inputHelper->textBox('facebook', 'facebook', 'facebook', 25, false, $this->insertValue['facebook']);
     $this->form .= $this->createLocalizationFormRow($facebook, false, 'facebook');
     // twitter
     $twitter = $this->inputHelper->textBox('twitter', 'twitter', 'twitter', 25, false, $this->insertValue['twitter']);
     $this->form .= $this->createLocalizationFormRow($twitter, false, 'twitter');
     // instagram
     $instagram = $this->inputHelper->textBox('instagram', 'instagram', 'instagram', 25, false, $this->insertValue['instagram']);
     $this->form .= $this->createLocalizationFormRow($instagram, false, 'instagram');
     // youtube
     $youtube = $this->inputHelper->textBox('youtube', 'youtube', 'youtube', 25, false, $this->insertValue['youtube']);
     $this->form .= $this->createLocalizationFormRow($youtube, false, 'youtube');
     // livejournal
     $livejournal = $this->inputHelper->textBox('livejournal', 'livejournal', 'livejournal', 25, false, $this->insertValue['livejournal']);
     $this->form .= $this->createLocalizationFormRow($livejournal, false, 'livejournal');
     // blogger
     $blogger = $this->inputHelper->textBox('blogger', 'blogger', 'blogger', 25, false, $this->insertValue['blogger']);
     $this->form .= $this->createLocalizationFormRow($blogger, false, 'blogger');
     // siteName
     $siteName = $this->inputHelper->textBox('siteName', 'siteName', 'siteName', 25, false, $this->insertValue['siteName']);
     $this->form .= $this->createLocalizationFormRow($siteName, false, 'siteName');
     // siteUrl
     $siteUrl = $this->inputHelper->textBox('siteUrl', 'siteUrl', 'siteUrl', 200, false, $this->insertValue['siteUrl']);
     $this->form .= $this->createLocalizationFormRow($siteUrl, false, 'siteUrl');
     // captcha
     $captcha = $this->inputHelper->textBox("captcha", "captcha", "captcha", 20, true, null);
     $this->form .= $this->createFormRow($captcha, true, getCaptcha(120, 25));
     $this->form .= '</table>';
     $this->form .= $this->getUsersAgreements();
     $this->form .= '<div class="mandatoryText">' . $this->localization->getText('mandatoryText') . '</div>';
     $this->form .= '<center>';
     $this->form .= '<input class="RegistrationFormButton" type="submit" name="RegistrationFormSubmit" value="' . $this->localization->getText("registrationFormButtonText") . '">';
     $this->form .= '</form>';
 }