当前位置: 首页>>代码示例>>PHP>>正文


PHP COMMONFUNC::getLatLong方法代码示例

本文整理汇总了PHP中COMMONFUNC::getLatLong方法的典型用法代码示例。如果您正苦于以下问题:PHP COMMONFUNC::getLatLong方法的具体用法?PHP COMMONFUNC::getLatLong怎么用?PHP COMMONFUNC::getLatLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在COMMONFUNC的用法示例。


在下文中一共展示了COMMONFUNC::getLatLong方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$lnb = "10";
$error_msg = '';
$flag = 0;
if ($_POST['isSubmit'] == 'save') {
    //Edit the user info
    $fldSchoolname = $func->input_fun($_POST['fldSchoolname']);
    $whereClause = "fldSchoolname='" . $fldSchoolname . "'";
    if ($db->MatchingRec(TBL_HS_AAU_TEAM, $whereClause) > 0) {
        #user Username already exists
        $error_msg = 'This HS/AAU Team Code Already Exists!';
        $flag++;
    }
    if ($flag == 0) {
        $errors = 0;
        //Insert data
        $Zipcode_lat_lon = $func->getLatLong($func->input_fun($_POST['fldZipcode']), MAPS_APIKEY);
        $strDataArr = array('fldSchoolname' => $func->input_fun($_POST['fldSchoolname']), 'fldAddress' => $func->input_fun($_POST['fldAddress']), 'fldCity' => $func->input_fun($_POST['fldCity']), 'fldState' => $func->input_fun($_POST['fldState']), 'fldZipcode' => $func->input_fun($_POST['fldZipcode']), 'fldStatus' => $func->input_fun($_POST['fldStatus']), 'fldEnrollment' => $func->input_fun($_POST['fldEnrollment']), 'fldLatitude' => $Zipcode_lat_lon['Latitude'], 'fldLongitude' => $Zipcode_lat_lon['Longitude']);
        //$s=$_POST;
        //print_r($s);
        $db->insertRec(TBL_HS_AAU_TEAM, $strDataArr);
        #redirect to listing page on successfull updation
        header("Location: ADSchoolList.php?msg={$fldSchoolname} is Added Successfully, ");
    }
    //this section is use to filup the value after erro message.
    if ($error_msg != "") {
        $fldSchoolname = $_REQUEST['fldSchoolname'];
        $fldAddress = $_REQUEST['fldAddress'];
        $fldCity = $_REQUEST['fldCity'];
        $fldState = $_REQUEST['fldState'];
        $fldZipcode = $_REQUEST['fldZipcode'];
        $fldEnrollment = $_REQUEST['fldEnrollment'];
开发者ID:trungjc,项目名称:collegeprospectnetwork,代码行数:31,代码来源:ADSchoolAdd.php

示例2: date

 if ($_REQUEST['fldJerseyNumber'] == '') {
     $error_msg[] = "Please Select Jersey Number.";
 }
 $mysqlDateString = date('Y-m-d H:i:s', $phpdate);
 $strDataArr = array('fldUsername' => $func->input_fun($_POST['fldUsername']), 'fldPassword' => $func->input_fun($_POST['fldPassword']), 'fldEmail' => $func->input_fun($_POST['fldEmail']), 'fldFirstname' => $func->input_fun($_POST['fldFirstname']), 'fldLastname' => $func->input_fun($_POST['fldLastname']), 'fldClass' => $func->input_fun($_POST['fldClass']), 'fldHeight' => $func->input_fun($_POST['fldHeight']), 'fldWeight' => $func->input_fun($_POST['fldWeight']), 'fldSchool' => $Team_id, 'fldSport' => $sport_empty, 'fldStatus' => $func->input_fun($_POST['fldStatus']), 'fldIntendedMajor' => $func->input_fun($_POST['fldIntendedMajor']), 'fldOthers' => $func->input_fun($_POST['fldOthers']), 'fldQuestion' => $func->input_fun($_POST['fldQuestion']), 'fldAnswer' => $func->input_fun($_POST['fldAnswer']), 'fldState' => $func->input_fun($_POST['fldState']), 'fldJerseyNumber' => $func->input_fun($_POST['fldJerseyNumber']), 'fldAddDate' => date("y-m-d"));
 //Continue If No Form Errors
 if (count($error_msg) == 0) {
     //Insert Data - Get NewUserID
     $res = $db->insertRec(TBL_ATHELETE_REGISTER, $strDataArr);
     $NewUserId = $res;
     if ($_POST['fldSchool'] == "other") {
         ##########################################
         ### Insert Custom College ###
         ##########################################
         //Get Lattitude & Longitude
         $Zipcode_lat_lon = $func->getLatLong($_POST['fldZipcode'], MAPS_APIKEY);
         //Build Insert Data
         $fldStatus = "ACTIVE";
         $strDataArr_school = array('fldSchoolname' => $func->input_fun($_POST['txtfldName']), 'fldAddress' => $func->input_fun($_POST['fldAddress']), 'fldCity' => $func->input_fun($_POST['fldCity']), 'fldState' => $func->input_fun($_POST['fldState']), 'fldZipcode' => $func->input_fun($_POST['fldZipcode']), 'fldStatus' => $fldStatus, 'fldLatitude' => $Zipcode_lat_lon['Latitude'], 'fldLongitude' => $Zipcode_lat_lon['Longitude'], 'fldAdminApproved' => 0, 'fldAddByAthleteUsername' => $_POST['fldUsername'], 'fldAddDate' => date("y-m-d"));
         //Insert & Set CollegeSchoolId
         $NewSchoolId = $db->insertRec(TBL_HS_AAU_TEAM, $strDataArr_school);
         $HighSchoolId = $NewSchoolId;
         //Update  User's fldSchool column
         $strDataArr_schoolreg_update = array('fldSchool' => $HighSchoolId);
         $where_schoolreg_update = "fldId = " . $NewUserId;
         $db->updateRec(TBL_ATHELETE_REGISTER, $strDataArr_schoolreg_update, $where_schoolreg_update);
         ################# Insert Custom College #################
     }
     // Send email to coach for Approval
     if ($_POST['fldSchool'] != "other") {
         //User Selected School
开发者ID:trungjc,项目名称:collegeprospectnetwork,代码行数:31,代码来源:Registration-Athlete.php


注:本文中的COMMONFUNC::getLatLong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。