Задать вопрос
  • ПОчему в IE 11 не работает карусель?

    @vadim_sverdlik Автор вопроса
    у меня там указано только api-maps.yandex.ru и еще одна,но кажется они не влияют ни на что
  • Как решить данную задачу с подкатегориями в Опенкарт?

    @vadim_sverdlik Автор вопроса
    Прошу,если можно,помочь детальнее
  • Как сделать цикл записей в вордпресс?

    @vadim_sverdlik Автор вопроса
    пробовал,не работает
  • Как сделать корректное отображение сайта в IE?

    @vadim_sverdlik Автор вопроса
    как решить данную проблему?
  • Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in?

    @vadim_sverdlik Автор вопроса
    mysqli_ не помогает,оно уже ошибку не выдает,но долго грузит и выдает что не может соедениться с БД

    Warning: mysqli_connect(): (HY000/2002): Connection timed out in /var/www/ubktest052017/ubk-test052017.it4u.ua/common/mngrdb.php on line 19
    Не могу создать соединение c базой данных!
  • Как решить проблему с ошибкой?

    @vadim_sverdlik Автор вопроса
    class H2o_Lexer {
    function __construct($options = array()) {
    $this->options = $options;

    if ($this->options['TRIM_TAGS'])
    $trim = '(?:\r?\n)?';

    $this->pattern = ('/(.*?)(?:' .
    preg_quote($this->options['BLOCK_START']). '(.*?)' .preg_quote($this->options['BLOCK_END']) . $trim . '|' .
    preg_quote($this->options['VARIABLE_START']). '(.*?)' .preg_quote($this->options['VARIABLE_END']) . '|' .
    preg_quote($this->options['COMMENT_START']). '(.*?)' .preg_quote($this->options['COMMENT_END']) . $trim . ')/sm'
    );
    }

    function tokenize($source) {
    $result = new TokenStream;
    $pos = 0;
    $matches = array();
    preg_match_all($this->pattern, $source, $matches, PREG_SET_ORDER);

    foreach ($matches as $match) {
    if ($match[1])
    $result->feed('text', $match[1], $pos);
    $tagpos = $pos + strlen($match[1]);
    if ($match[2])
    $result->feed('block', trim($match[2]), $tagpos);
    elseif ($match[3])
    $result->feed('variable', trim($match[3]), $tagpos);
    elseif ($match[4])
    $result->feed('comment', trim($match[4]), $tagpos);
    $pos += strlen($match[0]);
    }
    if ($pos < strlen($source)){
    $result->feed('text', substr($source, $pos), $pos);
    }
    $result->close();
    return $result;
    }
    }

    class H2o_Parser {
    var $first;
    var $storage = array();
    var $filename;
    var $runtime;

    function __construct($source, $filename, $runtime, $options) {
    $this->options = $options;
    //$this->source = $source;

    // echo $source . "
    ";

    $this->runtime = $runtime;
    $this->filename = $filename;
    $this->first = true;

    // echo "$filename
    ";

    $this->lexer = new H2o_Lexer($options);
    $this->tokenstream = $this->lexer->tokenize($source);
    $this->storage = array(
    'blocks' => array(),
    'templates' => array(),
    'included' => array()
    );
    }

    function &parse() {
    $until = func_get_args();
    $nodelist = new NodeList($this);
    while($token = $this->tokenstream->next()) {
    //$token = $this->tokenstream->current();
    switch($token->type) {
    case 'text' :
    $node = new TextNode($token->content, $token->position);
    break;
    case 'variable' :
    $args = H2o_Parser::parseArguments($token->content, $token->position);
    $variable = array_shift($args);
    $filters = $args;
    $node = new VariableNode($variable, $filters, $token->position);
    break;
    case 'comment' :
    $node = new CommentNode($token->content);
    break;
    case 'block' :
    if (in_array($token->content, $until)) {
    $this->token = $token;
    return $nodelist;
    }
    @list($name, $args) = preg_split('/\s+/',$token->content, 2);
    $node = H2o::createTag($name, $args, $this, $token->position);
    $this->token = $token;
    }
    $this->searching = join(',',$until);
    $this->first = false;
    $nodelist->append($node);
    }

    if ($until){
    throw new TemplateSyntaxError('Unclose tag,expecting'.$until[0]);
    }
    return $nodelist;
    }

    function skipTo($until) {
    $this->parse($until);
    return null;
    }

    # Parse arguments
    static function parseArguments($source = null, $fpos = 0){
    $parser = new ArgumentLexer($source, $fpos);
    $result = array();
    $current_buffer = &$result;
    $filter_buffer = array();
    foreach ($parser->parse() as $token) {
    list($token, $data) = $token;
    if ($token == 'filter_start') {
    $filter_buffer = array();
    $current_buffer = &$filter_buffer;
    }
    elseif ($token == 'filter_end') {
    if (count($filter_buffer))
    $result[] = $filter_buffer;
    $current_buffer = &$result;
    }
    elseif ($token == 'name') {
    $current_buffer[] = symbol($data);
    }
    elseif ($token == 'number' || $token == 'string') {
    $current_buffer[] = $data;
    }
    elseif ($token == 'named_argument') {
    $last = $current_buffer[count($current_buffer) - 1];
    if (!is_array($last))
    $current_buffer[] = array();

    $namedArgs =& $current_buffer[count($current_buffer) - 1];
    list($name,$value) = array_map('trim', explode(':', $data, 2));
    $namedArgs[$name] = $value;
    }
    elseif( $token == 'operator') {
    $current_buffer[] = array('operator'=>$data);
    }
    }
    return $result;
    }
    }

    class H2O_RE {
    static $whitespace, $seperator, $parentheses, $pipe, $filter_end, $operator,
    $number, $string, $i18n_string, $name, $named_args;

    static function init() {
    $r = 'strip_regex';

    self::$whitespace = '/\s+/m';
    self::$parentheses = '/\(|\)/m';
    self::$filter_end = '/;/';
    self::$seperator = '/,/';
    self::$pipe = '/\|/';
    self::$operator = '/\s?(>|<|>=|<=|!=|==|!|and|not|or)\s?/i';
    self::$number = '/\d+(\.\d*)?/';
    self::$name = '/[a-zA-Z][a-zA-Z0-9-_]*(?:\.[a-zA-Z_0-9][a-zA-Z0-9_-]*)*/';

    self::$string = '/(?:
    "([^"\\\\]*(?:\\\\.[^"\\\\]*)*)" | # Double Quote string
    \'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\' # Single Quote String
    )/xsm';
    self::$i18n_string = "/_\({$r(self::$string)}\) | {$r(self::$string)}/xsm";

    self::$named_args = "{
    ({$r(self::$name)})(?:{$r(self::$whitespace)})?
    :
    (?:{$r(self::$whitespace)})?({$r(self::$i18n_string)}|{$r(self::$number)}|{$r(self::$name)})
    }x";
    }
    }
    H2O_RE::init();

    class ArgumentLexer {
    private $source;
    private $match;
    private $pos = 0, $fpos, $eos;
    private $operator_map = array(
    '!' => 'not', '!='=> 'ne', '==' => 'eq', '>' => 'gt', '<' => 'lt', '<=' => 'le', '>=' => 'ge'
    );

    function __construct($source, $fpos){
    if (!is_null($source))
    $this->source = $source;
    $this->fpos=$fpos;
    }

    function parse(){
    $result = array();
    $filtering = false;
    while (!$this->eos()) {
    $this->scan(H2O_RE::$whitespace);
    if (!$filtering) {
    if ($this->scan(H2O_RE::$operator)){
    $operator = trim($this->match);
    if(isset($this->operator_map[$operator]))
    $operator = $this->operator_map[$operator];
    $result[] = array('operator', $operator);
    }
    elseif ($this->scan(H2O_RE::$named_args))
    $result[] = array('named_argument', $this->match);
    elseif ($this->scan(H2O_RE::$name))
    $result[] = array('name', $this->match);
    elseif ($this->scan(H2O_RE::$pipe)) {
    $filtering = true;
    $result[] = array('filter_start', $this->match);
    }
    elseif ($this->scan(H2O_RE::$seperator))
    $result[] = array('separator', null);
    elseif ($this->scan(H2O_RE::$i18n_string))
    $result[] = array('string', $this->match);
    elseif ($this->scan(H2O_RE::$number))
    $result[] = array('number', $this->match);
    else
    throw new TemplateSyntaxError('unexpected character in filters : "'. $this->source[$this->pos]. '" at '.$this->getPosition());
    }
    else {
    // parse filters, with chaining and ";" as filter end character
    if ($this->scan(H2O_RE::$pipe)) {
    $result[] = array('filter_end', null);
    $result[] = array('filter_start', null);
    }
    elseif ($this->scan(H2O_RE::$seperator))
    $result[] = array('separator', null);
    elseif ($this->scan(H2O_RE::$filter_end)) {
    $result[] = array('filter_end', null);
    $filtering = false;
    }
    elseif ($this->scan(H2O_RE::$named_args))
    $result[] = array('named_argument', $this->match);
    elseif ($this->scan(H2O_RE::$name))
    $result[] = array('name', $this->match);
    elseif ($this->scan(H2O_RE::$i18n_string))
    $result[] = array('string', $this->match);
    elseif ($this->scan(H2O_RE::$number))
    $result[] = array('number', $this->match);
    else
    throw new TemplateSyntaxError('unexpected character in filters : "'. $this->source[$this->pos]. '" at '.$this->getPosition());
    }
    }
    // if we are still in the filter state, we add a filter_end token.
    if ($filtering)
    $result[] = array('filter_end', null);
    return $result;
    }
    }
  • Как зайти в админку?

    @vadim_sverdlik Автор вопроса
    Спасибо,Алексей!
  • Как исправить форму отправки на почту?

    @vadim_sverdlik Автор вопроса
    <?php
    header('Refresh: 1; URL=' .$_SERVER['HTTP_REFERER']);
    header('Location: pay.php');
    require 'connect.php';

    //$to = "sales@zoom-bleach.com";
    $to = "vadim_sverdlik@ukr.net";

    $name = $_REQUEST['contact_name'];
    $phone = $_REQUEST['phone'];
    $email = $_REQUEST['email'];
    $mess = $_REQUEST['adress'];
    $subject = "Оформление заказа на сайте zoom-bleach.com";

    $message1 = "

    Имя: $name";

    $message3 = "

    Телефон: $phone";

    $message2 = "

    E-mail: $email";

    $mess1 = "

    Адрес для доставки: $mess";

    $message = "$message1, $message2, $mess1, $message3";

    mail($to, $subject, $message);
    ?>