コード例 #1
0
ファイル: test.php プロジェクト: s-a-r-id/geograph-project
        fail('$CONF[\'CONTENT_HOST\'] (' . $CONF['CONTENT_HOST'] . ") - does not seem to work ({$httperr}) - REQUIRED");
    }
} else {
    fail('$CONF[\'CONTENT_HOST\'] not defined - REQUIRED');
}
if (!empty($CONF['STATIC_HOST'])) {
    status("checking " . $CONF['STATIC_HOST']);
    if (!check_http('/img/adodb.gif', '/.+/', $httperr, $CONF['STATIC_HOST'], 200)) {
        fail('$CONF[\'STATIC_HOST\'] (' . $CONF['STATIC_HOST'] . ") - does not seem to work ({$httperr}) - REQUIRED");
    }
    if ($CONF['enable_cluster']) {
        if (strpos($CONF['STATIC_HOST'], '0') !== FALSE) {
            for ($q = 0; $q < $CONF['enable_cluster']; $q++) {
                $host = str_replace('0', $q % $CONF['enable_cluster'], $CONF['STATIC_HOST']);
                status("checking " . $host);
                if (!check_http('/img/adodb.gif', '/.+/', $httperr, $host, 200)) {
                    fail("{$host} - does not seem to work ({$httperr}) - REQUIRED (or disable \$CONF['enable_cluster'])");
                }
            }
        } else {
            fail('$CONF[\'STATIC_HOST\'] doesn\'t contain "0" - REQUIRED');
        }
    }
} else {
    fail('$CONF[\'STATIC_HOST\'] not defined - REQUIRED');
}
if (empty($CONF['server_ip']) || strpos($_SERVER['SERVER_ADDR'], $CONF['server_ip']) !== 0) {
    fail('$CONF[\'server_ip\'] (' . $CONF['server_ip'] . ') does not match $_SERVER[\'SERVER_ADDR\'] (' . $_SERVER['SERVER_ADDR'] . ') - HIGHLY RECOMMENDED');
}
/////////////////////////////////////////////////////////////
// few sanity checks
コード例 #2
0
<?php

/*
 * Module:      process_styles_edit.inc.php
 * Description: This module does all the heavy lifting for adding/editing info in the "sponsors" table
 */
if (isset($_SESSION['loginUsername']) && $_SESSION['userLevel'] <= 1) {
    $sponsorURL = check_http($_POST['sponsorURL']);
    $sponsor_name = capitalize($_POST['sponsorName']);
    if (NHC) {
        // Place NHC SQL calls below
    } else {
        if ($action == "update") {
            foreach ($_POST['id'] as $id) {
                if ($_POST['sponsorEnable' . $id] == 1) {
                    $enable = 1;
                } else {
                    $enable = 0;
                }
                $updateSQL = sprintf("UPDATE %s SET sponsorEnable='%s' WHERE id='%s'", $sponsors_db_table, $enable, $id);
                mysql_real_escape_string($updateSQL);
                $result1 = mysql_query($updateSQL, $brewing) or die(mysql_error());
            }
            $massUpdateGoTo = $base_url . "index.php?section=admin&go=sponsors&msg=9";
            $pattern = array('\'', '"');
            $massUpdateGoTo = str_replace($pattern, "", $massUpdateGoTo);
            header(sprintf("Location: %s", stripslashes($massUpdateGoTo)));
        }
        if ($action == "add") {
            $insertSQL = sprintf("INSERT INTO {$sponsors_db_table} (sponsorName, sponsorURL, sponsorImage, sponsorText, sponsorLocation, sponsorLevel, sponsorEnable) VALUES (%s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($sponsor_name, "text"), GetSQLValueString($sponsorURL, "text"), GetSQLValueString($_POST['sponsorImage'], "text"), GetSQLValueString($_POST['sponsorText'], "text"), GetSQLValueString($_POST['sponsorLocation'], "text"), GetSQLValueString($_POST['sponsorLevel'], "int"), GetSQLValueString($_POST['sponsorEnable'], "int"));
            mysql_select_db($database, $brewing);
コード例 #3
0
ファイル: functions.php プロジェクト: gk1/kazoo-provision
function check_couchdb($testhost)
{
    $host = false;
    global $dbport;
    if ($testhost) {
        $fping = exec("fping {$testhost} -t 50");
        if ($fping == $testhost . ' is alive') {
            $ret = json_decode(check_http('http://' . $testhost . ':' . $dbport, 2), TRUE);
            show_debug("Check couchdb:" . $testhost . ":" . $dbport . "/", 'd', __FILE__, __FUNCTION__, __LINE__);
            if ($ret['couchdb'] == 'Welcome' && $ret['version'] == '1.1.1') {
                return $testhost;
            } else {
                show_debug("FAILED couchdb:" . $testhost, '', __FILE__, __FUNCTION__, __LINE__);
            }
        } else {
            show_debug("FAILED fping:" . $pingt . " -t 50 ip=" . $testhost, '', __FILE__, __FUNCTION__, __LINE__);
        }
    }
    return false;
}
コード例 #4
0
<?php

/*
 * Module:      process_drop_off.inc.php
 * Description: This module does all the heavy lifting for adding/editing info in the "drop_off" table
 */
if (isset($_SESSION['loginUsername']) && $_SESSION['userLevel'] <= 1 || $section == "setup") {
    if (NHC) {
        // Place NHC SQL calls below
    } else {
        $dropLocationWebsite = check_http($_POST['dropLocationWebsite']);
        $dropLocationName = strtr($_POST['dropLocationName'], $html_string);
        if ($action == "add") {
            $insertSQL = sprintf("INSERT INTO {$drop_off_db_table} (dropLocationName, dropLocation, dropLocationPhone, dropLocationWebsite, dropLocationNotes) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString(capitalize($dropLocationName), "text"), GetSQLValueString(strtr($_POST['dropLocation'], $html_string), "text"), GetSQLValueString($_POST['dropLocationPhone'], "text"), GetSQLValueString(strtolower($dropLocationWebsite), "text"), GetSQLValueString(strtr($_POST['dropLocationNotes'], $html_string), "text"));
            mysql_select_db($database, $brewing);
            mysql_real_escape_string($insertSQL);
            $result1 = mysql_query($insertSQL, $brewing) or die(mysql_error());
            if ($section == "setup") {
                $insertGoTo = "../setup.php?section=step6&msg=11";
            } else {
                $insertGoTo = $insertGoTo;
            }
            $pattern = array('\'', '"');
            $insertGoTo = str_replace($pattern, "", $insertGoTo);
            header(sprintf("Location: %s", stripslashes($insertGoTo)));
        }
        if ($action == "edit") {
            $updateSQL = sprintf("UPDATE {$drop_off_db_table} SET dropLocationName=%s, dropLocation=%s, dropLocationPhone=%s, dropLocationWebsite=%s, dropLocationNotes=%s WHERE id=%s", GetSQLValueString(capitalize($dropLocationName), "text"), GetSQLValueString(strtr($_POST['dropLocation'], $html_string), "text"), GetSQLValueString($_POST['dropLocationPhone'], "text"), GetSQLValueString(strtolower($dropLocationWebsite), "text"), GetSQLValueString(strtr($_POST['dropLocationNotes'], $html_string), "text"), GetSQLValueString($id, "int"));
            mysql_select_db($database, $brewing);
            mysql_real_escape_string($updateSQL);
            $result1 = mysql_query($updateSQL, $brewing) or die(mysql_error());
コード例 #5
0
if (isset($_SESSION['loginUsername']) && $_SESSION['userLevel'] == 0 || $section == "setup") {
    // Constants
    $contestRegistrationOpen = strtotime($_POST['contestRegistrationOpen'] . " " . $_POST['contestRegistrationOpenTime']);
    $contestRegistrationDeadline = strtotime($_POST['contestRegistrationDeadline'] . " " . $_POST['contestRegistrationDeadlineTime']);
    $contestEntryOpen = strtotime($_POST['contestEntryOpen'] . " " . $_POST['contestEntryOpenTime']);
    $contestEntryDeadline = strtotime($_POST['contestEntryDeadline'] . " " . $_POST['contestEntryDeadlineTime']);
    $contestJudgeOpen = strtotime($_POST['contestJudgeOpen'] . " " . $_POST['contestJudgeOpenTime']);
    $contestJudgeDeadline = strtotime($_POST['contestJudgeDeadline'] . " " . $_POST['contestJudgeDeadlineTime']);
    $contestAwardsLocDate = strtotime($_POST['contestAwardsLocDate'] . " " . $_POST['contestAwardsLocTime']);
    $contestShippingOpen = strtotime($_POST['contestShippingOpen']);
    $contestShippingDeadline = strtotime($_POST['contestShippingDeadline']) + 86399;
    // add 86399 seconds to make sure the closing time is 11:59 PM on the day requested
    $contestDropoffOpen = strtotime($_POST['contestDropoffOpen']);
    $contestDropoffDeadline = strtotime($_POST['contestDropoffDeadline']) + 86399;
    // add 86399 seconds to make sure the closing time is 11:59 PM on the day requested
    $contestHostWebsite = check_http($_POST['contestHostWebsite']);
    //echo $contestRegistrationOpen."<br>"; echo $contestRegistrationDeadline."<br>"; echo $contestEntryOpen ."<br>"; echo $contestEntryDeadline."<br>"; echo $judgingDate."<br>";
    //echo "<br>".$tz; echo "<br>".$timezone_offset; echo "<br>".$_SESSION['prefsTimeZone'];
    if (NHC) {
        // Place NHC SQL calls below
    } else {
        // --------------------------------------- Adding (SETUP ONLY) ----------------------------------------
        if ($action == "add") {
            if ($_POST['contestEntryFee2'] == "" || $_POST['contestEntryFeeDiscountNum'] == "") {
                $contestEntryFeeDiscount = "N";
            }
            if ($_POST['contestEntryFee2'] != "" && $_POST['contestEntryFeeDiscountNum'] != "") {
                $contestEntryFeeDiscount = "Y";
            }
            $insertSQL = sprintf("INSERT INTO {$contest_info_db_table} (\r\n\t\tcontestName,\r\n\t\tcontestID,\r\n\t\tcontestHost, \r\n\t\tcontestHostWebsite, \r\n\t\tcontestHostLocation,\r\n\t\t\r\n\t\tcontestRegistrationOpen,\r\n\t\tcontestRegistrationDeadline, \r\n\t\tcontestEntryOpen,\r\n\t\tcontestEntryDeadline, \r\n\t\tcontestJudgeOpen,\r\n\t\t\r\n\t\tcontestJudgeDeadline,\r\n\t\tcontestRules,\r\n\t\tcontestAwardsLocation,\r\n\t\t\r\n\t\tcontestEntryFee,\r\n\t\tcontestBottles, \r\n\t\tcontestShippingAddress, \r\n\t\tcontestShippingName, \r\n\t\tcontestAwards,\r\n\t\tcontestDropoffOpen,\r\n\t\tcontestDropoffDeadline,\r\n\t\tcontestEntryCap,\r\n\t\tcontestAwardsLocName,\r\n\t\tcontestAwardsLocTime,\r\n\t\t\r\n\t\tcontestEntryFee2,\r\n\t\tcontestEntryFeeDiscount,\r\n\t\tcontestEntryFeeDiscountNum,\r\n\t\tcontestLogo,\r\n\t\tcontestBOSAward,\r\n\t\t\r\n\t\tcontestEntryFeePassword,\r\n\t\tcontestEntryFeePasswordNum,\r\n\t\tcontestCircuit,\r\n\t\tcontestVolunteers,\r\n\t\tcontestShippingOpen,\r\n\t\tcontestShippingDeadline,\r\n\t\tid\r\n\t\t) \r\n\t\tVALUES \r\n\t\t(\r\n\t\t%s, %s, %s, %s, %s, \r\n\t\t%s, %s, %s, %s, %s,\r\n\t\t%s, %s, %s, %s, %s, \r\n\t\t%s, %s, %s, %s, %s, \r\n\t\t%s, %s, %s, %s, %s,\r\n\t\t%s, %s, %s, %s, %s,\r\n\t\t%s, %s, %s, %s, %s)", GetSQLValueString($_POST['contestName'], "text"), GetSQLValueString($_POST['contestID'], "text"), GetSQLValueString($_POST['contestHost'], "text"), GetSQLValueString($contestHostWebsite, "text"), GetSQLValueString($_POST['contestHostLocation'], "text"), GetSQLValueString($contestRegistrationOpen, "text"), GetSQLValueString($contestRegistrationDeadline, "text"), GetSQLValueString($contestEntryOpen, "text"), GetSQLValueString($contestEntryDeadline, "text"), GetSQLValueString($contestJudgeOpen, "text"), GetSQLValueString($contestJudgeDeadline, "text"), GetSQLValueString($_POST['contestRules'], "text"), GetSQLValueString($_POST['contestAwardsLocation'], "text"), GetSQLValueString($_POST['contestEntryFee'], "text"), GetSQLValueString($_POST['contestBottles'], "text"), GetSQLValueString($_POST['contestShippingAddress'], "text"), GetSQLValueString($_POST['contestShippingName'], "text"), GetSQLValueString($_POST['contestAwards'], "text"), GetSQLValueString($contestDropoffOpen, "text"), GetSQLValueString($contestDropoffDeadline, "text"), GetSQLValueString($_POST['contestEntryCap'], "text"), GetSQLValueString($_POST['contestAwardsLocName'], "text"), GetSQLValueString($contestAwardsLocDate, "text"), GetSQLValueString($_POST['contestEntryFee2'], "text"), GetSQLValueString($contestEntryFeeDiscount, "text"), GetSQLValueString($_POST['contestEntryFeeDiscountNum'], "text"), GetSQLValueString($_POST['contestLogo'], "text"), GetSQLValueString($_POST['contestBOSAward'], "text"), GetSQLValueString($_POST['contestEntryFeePassword'], "text"), GetSQLValueString($_POST['contestEntryFeePasswordNum'], "text"), GetSQLValueString($_POST['contestCircuit'], "text"), GetSQLValueString($_POST['contestVolunteers'], "text"), GetSQLValueString($contestShippingOpen, "text"), GetSQLValueString($contestShippingDeadline, "text"), GetSQLValueString($id, "int"));
            mysql_select_db($database, $brewing);
コード例 #6
0
ファイル: functions.php プロジェクト: urueedi/kazoo-regextern
function check_couchdb($testhost)
{
    $host = false;
    $pingt = exec("fping  -t 30 " . $testhost);
    if ($pingt == $testhost . ' is alive') {
        $ret = json_decode(check_http('http://' . $testhost . ':5984', 2), TRUE);
        do_log("Check couchdb:" . $testhost . ":5984/", 'd', __FILE__, __FUNCTION__, __LINE__);
        if ($ret['couchdb'] == 'Welcome' && $ret['version'] == '1.1.1') {
            return $testhost;
        } else {
            do_log("FAILED couchdb:" . $testhost, '', __FILE__, __FUNCTION__, __LINE__);
        }
    } else {
        do_log("FAILED fping:" . $pingt . " -t 50 ip=" . $testhost, '', __FILE__, __FUNCTION__, __LINE__);
    }
    return false;
}
コード例 #7
0
 public function save()
 {
     if (!isset($this->contact_name) || empty($this->contact_name)) {
         $this->errors[] = "Contact Name is Required";
     }
     if (isset($this->contact_telephone) && !empty($this->contact_telephone)) {
         $this->contact_telephone = phone_number($this->contact_telephone);
         if (!$this->contact_telephone) {
             $this->errors[] = "Invalid phone number " . $this->contact_telephone;
         }
     }
     if (!isset($this->poster_email) || empty($this->poster_email)) {
         $this->errors[] = "Email address is Required";
     }
     if (isset($this->poster_email) && !empty($this->poster_email)) {
         $this->poster_email = check_email($this->poster_email);
         if ($this->poster_email == "") {
             $this->errors[] = "Invalid email address e.g user@domain.com/co.uk/net";
         }
     }
     if (!empty($this->site_link)) {
         if (validateURL($this->site_link)) {
             $this->site_link = check_http($this->site_link);
         } else {
             $this->errors[] = "Invalid URL address e.g www.domain.com/co.uk/net";
         }
     }
     if (!isset($this->job_title) || empty($this->job_title)) {
         $this->errors[] = "Job Title is Required";
     }
     $allowedTags = '<p><strong><em><u><img><span><style><blockquote>';
     $allowedTags .= '<li><ol><ul><span><div><br><ins><del><a><span>';
     $this->job_description = strip_tags(stripslashes($this->job_description), $allowedTags);
     if (!isset($this->job_description) || empty($this->job_description)) {
         $this->errors[] = "Job Description is Required";
     }
     if (!isset($this->job_type) || empty($this->job_type) || $this->job_type <= 0) {
         $this->errors[] = "Job Type is Required";
     }
     if (!isset($this->j_status) || empty($this->j_status) || $this->j_status <= 0) {
         $this->errors[] = "Job Status is Required";
     }
     if (empty($this->state_province) || empty($this->county) || (!isset($this->city) || empty($this->city))) {
         $this->errors[] = "Job Location is Required";
     }
     if (!isset($this->category) || empty($this->category) || $this->category <= 0) {
         $this->errors[] = "Job Category is Required";
     }
     if ($this->category > 10) {
         $this->errors[] = "MAX 10 categories allowed";
     }
     if (sizeof($this->errors) == 0) {
         // A new record won't have an id yet.
         if (isset($this->id)) {
             return $this->update();
         } else {
             $this->var_name = $this->mod_write_check($this->job_title, null);
             if (ENABLE_NEW_JOBS == "Y" || ENABLE_NEW_JOBS == "1") {
                 $this->is_active = "Y";
             }
             if (APPROVE_JOB == "Y" || APPROVE_JOB == "1") {
                 $this->job_status = "approved";
             }
             $this->created_at = strftime(" %Y-%m-%d %H:%M:%S ", time());
             if ($this->create()) {
                 return true;
             } else {
                 $this->errors[] = "Problem occur.Please make sure all fields have been complated";
                 return false;
             }
         }
     }
 }
コード例 #8
0
 public function save()
 {
     /** company_name **/
     if (empty($this->company_name)) {
         $this->errors[] = "Please enter company name";
     }
     if (!empty($this->temp_path) && !empty($this->filename)) {
         $this->company_logo = $this->username . "." . $this->exe;
         // Determine the target_path
         $target_path = COM_IMAGES_PATH . DS . $this->company_logo;
         $size = getimagesize($this->temp_path);
         $width = $size[0];
         $height = $size[1];
         if ($width > PIC_WIDTH || $height > PIC_HEIGHT) {
             $this->errors[] = "File size needs to be smaller then " . PIC_WIDTH . "x" . PIC_HEIGHT;
         }
         // Make sure a file doesn't already exist in the target location
         if (file_exists($target_path)) {
             $this->errors[] = "The file {$this->filename} already exists.";
             //return false;
         }
     }
     if (!empty($this->site_link)) {
         if (validateURL($this->site_link)) {
             $this->site_link = check_http($this->site_link);
         } else {
             $this->errors[] = "Please enter valid URL e.g. http://wwww.domain.com/uk/org";
         }
     }
     if (empty($this->country) || $this->country == 'AA') {
         $this->errors[] = "Please select country from list";
     }
     if (!empty($this->phone_number)) {
         $this->phone_number = phone_number($this->phone_number);
         if (!$this->phone_number) {
             $this->errors[] = "Please enter vaild phone number";
         }
     }
     // A new record won't have an id yet.
     if (isset($this->id)) {
         if (empty($this->contact_name)) {
             $this->errors[] = "Please enter contact name";
         }
         if (empty($this->address)) {
             $this->errors[] = "Please enter first line of address";
         }
         if (empty($this->state_province)) {
             $this->errors[] = "Please select state from list";
         }
         if (empty($this->county)) {
             $this->errors[] = "Please select county from list";
         }
         if (empty($this->city)) {
             $this->errors[] = "Please select city from list";
         }
         if (empty($this->phone_number)) {
             $this->errors[] = "Please enter contact telephone number";
         }
         if (!empty($this->phone_number)) {
             $this->phone_number = phone_number($this->phone_number);
             if (!$this->phone_number) {
                 $this->errors[] = "Please enter vaild phone number";
             }
         }
         if (sizeof($this->errors) == 0) {
             if (!empty($this->temp_path) && !empty($this->filename)) {
                 // Attempt to move the file
                 if (!move_uploaded_file($this->temp_path, $target_path)) {
                     $this->errors[] = "Unable to save company logo";
                     return false;
                 }
             }
             // if no errors update
             if ($this->update()) {
                 // We are done with temp_path, the file isn't there anymore
                 unset($this->temp_path);
                 return true;
             } else {
                 // File was not moved.
                 $this->errors[] = "Problem try to update your details. Please make sure all fields have been complated";
                 return false;
             }
         }
         //add new record
     } else {
         if (empty($this->username)) {
             $this->errors[] = "Please enter username";
         }
         //if username enter check username
         if (!empty($this->username)) {
             $username_found = self::check_username($this->username);
             if ($username_found && $username_found->username != $_SESSION['uname']) {
                 $this->errors[] = "Username already existed";
             }
             if (!check_username($this->username)) {
                 $this->errors[] = "The username should contain only letters, numbers and underscores";
             }
             if (strlen($this->username) < 4 || strlen($this->username) > 30) {
                 $this->errors[] = "The username must be between 4 - 30 characters";
             }
         }
         /*** Email validation */
         if (empty($this->email_address)) {
             $this->errors[] = "Please enter email address";
         }
         /* email**/
         if (!empty($this->email_address)) {
             if (!check_email($this->email_address)) {
                 $this->errors[] = "Invalid Email address e.g user@domain.com/co.uk/net";
             } else {
                 $email_found = self::check_email($this->email_address);
                 if ($email_found && $email_found->email_address != $_SESSION['email']) {
                     $this->errors[] = "Email address already existed";
                 }
             }
         }
         /** check password and conform password **/
         if ($this->passwd != $this->confirm_password || empty($this->passwd)) {
             $this->errors[] = "Password and Confirm Password does not match";
         }
         if (strlen($this->passwd) < 6 || strlen($this->passwd) > 20) {
             $this->errors[] = "Password must be between 6 - 20 characters ";
         }
         /*** check code */
         if (!$this->CAPTCHA) {
             $this->errors[] = "The security code you entered does not match the image.";
         }
         if ($this->terms == "" || empty($this->terms)) {
             $this->errors[] = "Please accept <a href='" . BASE_URL . "employer/page/terms/'>Terms of Use</a>";
         }
         if (sizeof($this->errors) == 0) {
             if (!empty($this->temp_path) && !empty($this->filename)) {
                 // Attempt to move the file
                 if (!move_uploaded_file($this->temp_path, $target_path)) {
                     $this->errors[] = "Unable to save company logo";
                     return false;
                 }
             }
             /** add credits to user account */
             $this->job_qty = START_CREDIT_POST;
             $this->cv_qty = START_CREDIT_CV_SEARCH;
             $this->spotlight_qty = START_CREDIT_SPOTLIGHT;
             $this->is_active = ACTIVE_EMPLOYER_AUTO;
             $this->passwd = md5($this->passwd);
             $this->date_register = strftime(" %Y-%m-%d %H:%M:%S ", time());
             $this->actkey = md5(session_id());
             if ($this->create()) {
                 // We are done with temp_path, the file isn't there anymore
                 unset($this->temp_path);
                 return true;
             } else {
                 // File was not moved.
                 $this->errors[] = "Problem try to register your details. \r\n\t\t\t\t\t\t\t\t\t\tPlease make sure all fields have been complated";
                 return false;
             }
         }
     }
 }
コード例 #9
0
ファイル: meeting_cash.php プロジェクト: velocat/phpbb3
 include_once $phpbb_root_path . 'portal/includes/functions_grab.' . $phpEx;
 include_once $phpbb_root_path . 'portal/includes/functions_meeting.' . $phpEx;
 //include_once($phpbb_root_path . 'portal/includes/functions_latlon.' . $phpEx);
 $geouid = request_var('geouid', '');
 // Проверка на http:// в ссылках
 $mystring = $geouid;
 $findme = 'http';
 $pos = strpos($geouid, $findme);
 if ($pos === false) {
     $geouid = 'http://' . $geouid;
 }
 proverka_geo_uid($geouid);
 if (sizeof($geo_old) && $mode != 'edit') {
     $errors .= $user->lang['Error_duplicate'];
 } else {
     if (check_http($geouid)) {
         // Ccылка на geocaching.su ?
         $findme = 'geocaching.su';
         $pos = strpos($geouid, $findme);
         if ($pos === false) {
             $errors .= $user->lang['Error_geosu'];
         } else {
             grab_url($geouid);
             foreach ($lines as $line_num => $line) {
                 $line = iconv('windows-1251', 'UTF-8', $line);
                 if (preg_match_all('/<a href="note.php?/isU', $line, $res)) {
                     break;
                 }
                 $view_data .= $line;
                 //$errors .= "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n";
                 // Регион
コード例 #10
0
 // ----- Проверка заполнения обязат. полей -----
 // ---------------------------------------------
 $edit_no_pole = '';
 // Поля страны и региона в случае ошибки и возврата:
 $return_hidden_fields = build_hidden_fields(array('action' => 'reset', 'id' => $id, 'meeting_country' => $meeting_country, 'meeting_country_id' => $meeting_country_id, 'meeting_region' => $meeting_region, 'meeting_town' => $meeting_town, 'meeting_town_id' => $meeting_town_id, 'meeting_time' => $meeting_time, 'meeting_until' => $meeting_until, 'meeting_sbor' => $meeting_sbor, 'meeting_location' => $meeting_location, 'meeting_subject' => $meeting_subject, 'message' => $meeting_desc, 'meeting_link' => $meeting_link, 'meeting_link_gps' => $meeting_link_gps, 'meeting_places' => $meeting_places, 'meeting_by_user' => $meeting_auth, 'meeting_auth_id' => $meeting_auth, 'meeting_coorg' => $meeting_coorg, 'meeting_edit_by_user' => $user->data['user_id'], 'meeting_start_value' => $meeting_start_value, 'meeting_recure_value' => $meeting_recure_value, 'meeting_notify' => $meeting_notify, 'meeting_notify_user' => $meeting_notify_user, 'meeting_guest_overall' => $meeting_guest_overall, 'meeting_guest_single' => $meeting_guest_single, 'meeting_guest_names' => $meeting_guest_names, 'meeting_phone' => $meeting_phone, 'meeting_phone_allow' => $meeting_guest_phone, 'meeting_coorg_edit' => $meeting_coorg_edit, 'user_avatar' => $meeting_auth_avatar, 'user_avatar_type' => $user_avatar_type, 'bbcode_uid' => $bbcode_uid, 'bbcode_bitfield' => $bbcode_bitfield, 'meeting_el_link' => $meeting_el_link, 'meeting_el_ot' => $meeting_el_ot, 'meeting_el_do' => $meeting_el_do, 'meeting_el_time' => $meeting_el_time, 'meeting_marshrut' => $meeting_marshrut, 'meeting_marshrut_desc' => $meeting_marshrut_desc, 'meeting_trebovania' => $meeting_trebovania, 'meeting_plain_road' => $meeting_plain_road, 'meeting_plain_km' => $meeting_plain_km, 'comeback' => $meeting_comeback, 'meeting_onbike' => $meeting_onbike, 'tags' => $tags, 'meeting_days' => $meeting_days, 'meeting_geo_1' => $meeting_geo_1, 'meeting_geo_2' => $meeting_geo_2, 'meeting_geo_3' => $meeting_geo_3, 'geo_1_check' => $meeing_geocheck_1, 'geo_2_check' => $meeing_geocheck_2, 'geo_3_check' => $meeing_geocheck_3, 'meeting_geo_name_1' => $meeting_geo_name_1, 'meeting_geo_name_2' => $meeting_geo_name_2, 'meeting_geo_name_3' => $meeting_geo_name_3, 'attrib' => $meeting_attributes, 'hard' => $meeting_hard));
 $return_form = '<form action="' . append_sid("meeting_manage.{$phpEx}", "mode=edit&amp;id=" . $id) . '" method="post" name="return">';
 $return_form .= $return_hidden_fields . '<input type="submit" value="' . $user->lang['RESET'] . '" name="reset" class="button2" /><br>';
 $return_form .= '</form>';
 // Проверка Geo link
 $findme = 'geocaching.su';
 $meeting_geo_check[0] = $meeting_geo_1;
 $meeting_geo_check[1] = $meeting_geo_2;
 $meeting_geo_check[2] = $meeting_geo_3;
 for ($i = 0; $i < 3; $i++) {
     if ($meeting_geo_check[$i]) {
         if (check_http($meeting_geo_check[$i]) == false) {
             trigger_error($user->lang['TAYNIK_N'] . ($i + 1) . $user->lang['NO_HTTP_GEO'] . $return_form);
         }
         $pos = strpos($meeting_geo_check[$i], $findme);
         if ($pos === false) {
             trigger_error($user->lang['TAYNIK_N'] . ($i + 1) . $user->lang['NO_GEO_LINK'] . $return_form);
         }
     }
 }
 if ($meeting_subject == '') {
     trigger_error($user->lang['Subm_err_1'] . $return_form);
 } elseif ($meeting_time < time() && !$auth->acl_get('a_meetings')) {
     // модерац блок по времени возвращения
     if (!$meeting_plain_time) {
         trigger_error($user->lang['Subm_err_2'] . $return_form);
     } else {