コード例 #1
0
 function getCountryFullName($abbr)
 {
     if (strlen($abbr) == 2) {
         $countries = getCountryList();
         return isset($countries[$abbr]) ? $countries[$abbr] : '';
     }
     return $abbr;
 }
コード例 #2
0
ファイル: system.php プロジェクト: kshyana/Logiks-Core
 function getCountries()
 {
     include_once ROOT . API_FOLDER . "helpers/countries.php";
     $arr = getCountryList();
     foreach ($arr as $a => $b) {
         unset($arr[$a]);
         $arr[$b] = $b;
     }
     return $arr;
 }
コード例 #3
0
ファイル: countries.php プロジェクト: logiks/logiks-core
 function getUTCSelector($default = "")
 {
     $arr = getCountryList();
     $utc = getCountryUTC();
     $s = "<option value=''>None</option>";
     foreach ($arr as $a => $b) {
         $x = $utc[$a];
         if ($b == $default) {
             $s .= "<option value='{$x}' selected>{$b}</option>";
         } else {
             $s .= "<option value='{$x}'>{$b}</option>";
         }
     }
     return $s;
 }
コード例 #4
0
 /**
  * Welcome page
  *
  * @return string
  */
 public function welcome()
 {
     $oSession = $this->getInstance("oxSetupSession");
     //setting admin area default language
     $sAdminLang = $oSession->getSessionParam('setup_lang');
     $this->getInstance("oxSetupUtils")->setCookie("oxidadminlanguage", $sAdminLang, time() + 31536000, "/");
     $oView = $this->getView();
     $oView->setTitle('STEP_1_TITLE');
     $oView->setViewParam("aCountries", getCountryList());
     $oView->setViewParam("aLocations", getLocation());
     $oView->setViewParam("sSetupLang", $this->getInstance("oxSetupLang")->getSetupLang());
     $oView->setViewParam("sLocationLang", $oSession->getSessionParam('location_lang'));
     $oView->setViewParam("sCountryLang", $oSession->getSessionParam('country_lang'));
     return "welcome.php";
 }
コード例 #5
0
 *                                                                              *
 *  This software is provided by the copyright holders and contributors "as is" *
 *  and any express or implied warranties, including, but not limited to, the   *
 *  implied warranties of merchantability and fitness for a particular purpose  *
 *  are disclaimed. In no event shall the copyright owner or contributors be    *
 *  liable for any direct, indirect, incidental, special, exemplary, or         *
 *  consequential damages (including, but not limited to, procurement of        *
 *  substitute goods or services; loss of use, data, or profits; or business    *
 *  interruption) however caused and on any theory of liability, whether in     *
 *  contract, strict liability, or tort (including negligence or otherwise)     *
 *  arising in any way out of the use of this software, even if advised of the  *
 *  possibility of such damage.                                                 *
 *                                                                              *
 ********************************************************************************/
include_once "../config.php";
$countries = getCountryList();
?>
/**
 *	set which tab to show and load first
 */
Event.observe(window, 'load', function() {
	var itemobj = renderGroup(groupObj, 760, "", true, false);
	$('maingroupdiv').insert(itemobj);

	refreshIssues();
});

function changeGroupMode(obj, mode) {
	var wasPressed = false
	if (obj.className == "radiobuttonpressed") {
		wasPressed = true;
コード例 #6
0
 /**
  * Loads the data for the user from the database
  * This will not return a "group" (even though groups are
  * stored in the Users table)
  *
  * @param String $style (optional - default 'long') may be 'short' or 'long'
  * @return User object (this) (or Error object)
  */
 function load($style = 'long')
 {
     global $DB, $USER, $CFG, $ERROR, $HUB_FLM, $HUB_SQL, $HUB_CACHE;
     $this->style = $style;
     if (isset($HUB_CACHE)) {
         $cachedused = $HUB_CACHE->getObjData($this->userid . $style);
         if ($cachedused !== FALSE) {
             return $cachedused;
         }
     }
     $params = array();
     $params[0] = $this->userid;
     $resArray = $DB->select($HUB_SQL->DATAMODEL_USER_SELECT, $params);
     if ($resArray !== false) {
         $count = count($resArray);
         if ($count == 0) {
             $ERROR = new error();
             $ERROR->createUserNotFoundError($this->userid);
             return $ERROR;
         } else {
             for ($i = 0; $i < $count; $i++) {
                 $array = $resArray[$i];
                 $this->name = stripslashes($array['Name']);
                 $this->isgroup = $array['IsGroup'];
                 $this->creationdate = $array['CreationDate'];
                 $this->testgroup = $array['TestGroup'];
                 if ($array['Photo']) {
                     //set user photo and thumb the thumb creation is done during registration
                     $originalphotopath = $HUB_FLM->createUploadsDirPath($this->userid . "/" . stripslashes($array['Photo']));
                     if (file_exists($originalphotopath)) {
                         $this->photo = $HUB_FLM->getUploadsWebPath($this->userid . "/" . stripslashes($array['Photo']));
                         $this->thumb = $HUB_FLM->getUploadsWebPath($this->userid . "/" . str_replace('.', '_thumb.', stripslashes($array['Photo'])));
                         if (!file_exists($this->thumb)) {
                             create_image_thumb($array['Photo'], $CFG->IMAGE_THUMB_WIDTH, $this->userid);
                         }
                     } else {
                         //if the file does not exists how to get it from a upper level? change it to
                         //if file doesnot exists directly using default photo
                         if ($this->isgroup == "Y") {
                             $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
                             $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
                         } else {
                             $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
                             $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
                         }
                     }
                 } else {
                     if ($this->isgroup == "Y") {
                         $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
                         $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
                     } else {
                         $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
                         $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
                     }
                 }
                 $this->lastlogin = $array['LastLogin'];
                 $this->followsendemail = $array['FollowSendEmail'];
                 $this->followruninterval = $array['FollowRunInterval'];
                 $this->followlastrun = $array['FollowLastRun'];
                 if (isset($array['Newsletter'])) {
                     $this->newsletter = $array['Newsletter'];
                 }
                 if (isset($array['RecentActivitiesEmail'])) {
                     $this->recentactivitiesemail = $array['RecentActivitiesEmail'];
                 }
                 if (isset($array['CurrentStatus'])) {
                     $this->status = $array['CurrentStatus'];
                 }
                 if ($style == 'long') {
                     $this->description = stripslashes($array['Description']);
                     $this->modificationdate = $array['ModificationDate'];
                     $this->privatedata = $array['Private'];
                     $this->isadmin = $array['IsAdministrator'];
                     $this->authtype = $array['AuthType'];
                     $this->password = $array['Password'];
                     $this->website = $array['Website'];
                     $this->email = $array['Email'];
                     if (isset($array['Interest'])) {
                         $this->interest = $array['Interest'];
                     }
                     if (isset($array['LocationText'])) {
                         $this->location = $array['LocationText'];
                     } else {
                         $this->location = "";
                     }
                     if (isset($array['LocationCountry'])) {
                         $cs = getCountryList();
                         $this->countrycode = $array['LocationCountry'];
                         if (isset($cs[$array['LocationCountry']])) {
                             $this->country = $cs[$array['LocationCountry']];
                         }
                     } else {
                         $this->countrycode = "";
                     }
                     if (isset($array['LocationLat'])) {
                         $this->locationlat = $array['LocationLat'];
                     }
                     if (isset($array['LocationLng'])) {
                         $this->locationlng = $array['LocationLng'];
                     }
                     // REPAIR MISSING COODINATES
                     if (isset($this->location) && isset($this->countrycode) && $this->location != "" && $this->countrycode != "" && ((!isset($array['LocationLng']) || $array['LocationLng'] == "") && (!isset($array['LocationLat']) || $array['LocationLat'] == ""))) {
                         $coords = geoCode($this->location, $this->countrycode);
                         if ($coords["lat"] != "" && $coords["lng"] != "") {
                             $params = array();
                             $params[0] = $coords["lat"];
                             $params[1] = $coords["lng"];
                             $params[2] = $this->userid;
                             $res = $DB->insert($HUB_SQL->DATAMODEL_USER_LATLONG_UPDATE, $params);
                             $this->locationlat = $coords["lat"];
                             $this->locationlng = $coords["lng"];
                         }
                     }
                 }
             }
         }
     } else {
         return database_error();
     }
     //now add in any tags
     if ($style == 'long') {
         $params = array();
         $params[0] = $this->userid;
         $resArray = $DB->select($HUB_SQL->DATAMODEL_USER_TAGS, $params);
         if ($resArray !== false) {
             $count = count($resArray);
             if ($count > 0) {
                 $this->tags = array();
                 for ($i = 0; $i < $count; $i++) {
                     $array = $resArray[$i];
                     $tag = new Tag(trim($array['TagID']));
                     array_push($this->tags, $tag->load());
                 }
             }
         } else {
             return database_error();
         }
     }
     //load the current user's following for this user if any
     $this->userfollow = "N";
     $currentuser = '';
     if (isset($USER->userid)) {
         $currentuser = $USER->userid;
     }
     $params = array();
     $params[0] = $currentuser;
     $params[1] = $this->userid;
     $resArray = $DB->select($HUB_SQL->DATAMODEL_USER_FOLLOW, $params);
     if ($resArray !== false) {
         $count = count($resArray);
         if ($count > 0) {
             $this->userfollow = "Y";
         }
     } else {
         return database_error();
     }
     if (isset($HUB_CACHE)) {
         $HUB_CACHE->setObjData($this->userid . $style, $this, $CFG->CACHE_DEFAULT_TIMEOUT);
     }
     return $this;
 }
コード例 #7
0
session_start();
//mail Settings
include "inc/dbconn.php";
include "inc/function.php";
include "apis/get_user_details.php";
if (isset($_POST['action']) && !empty($_POST['action'])) {
    $action = $_POST['action'];
} elseif (isset($_GET['action']) && !empty($_GET['action'])) {
    $action = $_GET['action'];
}
switch ($action) {
    case 'fcr_dashboard':
        fcr_dashboard();
        break;
    case 'getCountryList':
        getCountryList();
        break;
    case 'getCountryDetails':
        getCountryDetails();
        break;
    case 'getCustomerVoice':
        getCustomerVoice();
        break;
    case 'getLocations':
        getLocations();
        break;
    case 'getModels':
        getModels();
        break;
    case 'getCategories':
        getCategories();
コード例 #8
0
ファイル: Property.php プロジェクト: JasoonS/SebastianServer
 public function edit_hotel_action($hotel_id)
 {
     $data = $this->input->post();
     $requested_mod = 'hotel';
     if (!$this->acl->hasPermission($requested_mod)) {
         redirect('admin/dashboard');
     }
     $this->validation_rules = array(array('field' => 'sb_hotel_country', 'label' => 'Country', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_state', 'label' => 'State', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_city', 'label' => 'City', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_address', 'label' => 'Address', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_zipcode', 'label' => 'Postal Code', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_owner', 'label' => 'Hotel Owner', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_website', 'label' => 'Hotel Website', 'rules' => 'required|prep_url', 'class' => 'text-danger'), array('field' => 'sb_hotel_email', 'label' => 'Hotel Email', 'rules' => 'required|valid_email', 'class' => 'text-danger'));
     $this->form_validation->set_error_delimiters('<div class="text-danger">', '</div>');
     $this->form_validation->set_rules($this->validation_rules);
     if ($this->form_validation->run() == FALSE) {
         $this->data['action'] = "admin/hotel/edit_hotel_action/{$hotel_id}";
         $this->data['countrylist'] = getCountryList();
         $this->data['languagelist'] = getAllLanguages();
         $this->data['hoteldata'] = $this->Hotel_model->get_hotel_data($hotel_id);
         $this->template->load('page_tpl', 'create_hotel', $this->data);
     } else {
         $this->data['hoteldata'] = $this->Hotel_model->get_hotel_data($hotel_id);
         $data["sb_hotel_pic"] = $this->data['hoteldata']['sb_hotel_pic'];
         if (!empty($_FILES['sb_hotel_pic']['name'])) {
             $folderName = HOTEL_PIC;
             $pic1 = upload_image($folderName, "sb_hotel_pic");
             if ($pic1 != 0) {
                 $data["sb_hotel_pic"] = $pic1;
             }
         }
         $hoteldata = array('sb_hotel_category' => $data['sb_hotel_category'], 'sb_hotel_star' => $data['sb_hotel_star'], 'sb_hotel_email' => $data['sb_hotel_email'], 'sb_hotel_website' => $data['sb_hotel_website'], 'sb_hotel_owner' => $data['sb_hotel_owner'], 'sb_hotel_country' => $data['sb_hotel_country'], 'sb_hotel_state' => $data['sb_hotel_state'], 'sb_hotel_city' => $data['sb_hotel_city'], 'sb_hotel_address' => $data['sb_hotel_address'], 'sb_hotel_zipcode' => $data['sb_hotel_zipcode'], 'sb_hotel_pic' => $data['sb_hotel_pic'], 'sb_property_built_month' => $data['sb_property_built_month'], 'sb_property_built_year' => $data['sb_property_built_year'], 'sb_property_open_year' => $data['sb_property_open_year']);
         $result = $this->Hotel_model->edit_hotel($hoteldata, $hotel_id);
         if ($result == '1') {
             $languageresult = $this->Hotel_model->set_hotel_languages($hotel_id, $data['sb_languages']);
             $this->session->set_flashdata('category_success', HOTEL_UPDATION_SUCCESS);
             redirect("admin/hotel/edit_hotel/{$hotel_id}");
         } else {
             $this->session->set_flashdata('category_error', HOTEL_UPDATION_FAIL);
             redirect("admin/hotel/edit_hotel/{$hotel_id}");
         }
     }
 }
コード例 #9
0
 /**
  * Loads the data for the group from the database
  *
  * @return Group object (this)
  */
 function load()
 {
     global $DB, $CFG, $HUB_FLM, $HUB_SQL, $LNG;
     $params = array();
     $params[0] = $this->groupid;
     $resArray = $DB->select($HUB_SQL->DATAMODEL_GROUP_SELECT, $params);
     if ($resArray !== false) {
         $count = count($resArray);
         if ($count == 0) {
             global $ERROR;
             $ERROR = new Error();
             $ERROR->createGroupNotFoundError($this->groupid);
             return $ERROR;
         }
         for ($i = 0; $i < $count; $i++) {
             $array = $resArray[$i];
             $this->name = stripslashes($array['Name']);
             $this->description = stripslashes($array['Description']);
             $this->website = stripslashes($array['Website']);
             $this->isopenjoining = $array['IsOpenJoining'];
             if ($array['Photo']) {
                 //set user photo and thumb the thumb creation is done during registration
                 $originalphotopath = $HUB_FLM->createUploadsDirPath($this->groupid . "/" . stripslashes($array['Photo']));
                 if (file_exists($originalphotopath)) {
                     $this->photo = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . stripslashes($array['Photo']));
                     $this->thumb = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . str_replace('.', '_thumb.', stripslashes($array['Photo'])));
                     if (!file_exists($this->thumb)) {
                         create_image_thumb($array['Photo'], $CFG->IMAGE_THUMB_WIDTH, $this->groupid);
                     }
                 } else {
                     //if the file does not exists how to get it from a upper level? change it to
                     //if file doesnot exists directly using default photo
                     $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
                     $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
                 }
             } else {
                 $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
                 $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
             }
             if (isset($array['LocationText'])) {
                 $this->location = $array['LocationText'];
             } else {
                 $this->location = "";
             }
             if (isset($array['LocationCountry'])) {
                 $cs = getCountryList();
                 $this->countrycode = $array['LocationCountry'];
                 if (isset($cs[$array['LocationCountry']])) {
                     $this->country = $cs[$array['LocationCountry']];
                 }
             } else {
                 $this->countrycode = "";
                 $this->country = "";
             }
             if (isset($array['LocationLat'])) {
                 $this->locationlat = $array['LocationLat'];
             }
             if (isset($array['LocationLng'])) {
                 $this->locationlng = $array['LocationLng'];
             }
         }
     } else {
         return database_error();
     }
     $this->loadmembers();
     $this->loadpendingmembers();
     $this->getDebateCount();
     $this->getVoteCount();
     return $this;
 }
コード例 #10
0
         }
     } else {
         $photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
         $thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
     }
 } else {
     $photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
     $thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
 }
 $location = "";
 $country = "";
 if (isset($array['LocationText'])) {
     $location = $array['LocationText'];
 }
 if (isset($array['LocationCountry'])) {
     $cs = getCountryList();
     if (isset($cs[$array['LocationCountry']])) {
         $country = $cs[$array['LocationCountry']];
     }
 }
 echo '<tr>';
 echo '<td valign="top">';
 echo '<a title="' . $LNG->SPAM_USER_ADMIN_VIEW_BUTTON . '" href="' . $CFG->homeAddress . 'user.php?userid=' . $userid . '"><img style="padding:5px;padding-bottom:10px;max-width:150px;max-height:100px;" border="0" src="' . $thumb . '" /></a>';
 echo '</td>';
 echo '<td valign="top">';
 echo $name;
 echo '</td>';
 echo '<td valign="top">';
 echo strftime('%d/%m/%Y', $date);
 echo '</td>';
 echo '<td valign="top">';
コード例 #11
0
ファイル: default_form.php プロジェクト: q0821/esportshop
		</div>
		<div class="control-group">
			<div class="control-label">
				<span class="editlinktip hasTip" title="<?php 
echo JText::_('AUP_COUNTRY');
?>
">
					<?php 
echo JText::_('AUP_COUNTRY');
?>
:
				</span>
			</div>
			<div class="controls">
				<?php 
echo getCountryList($row->country);
?>
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				<span class="editlinktip hasTip" title="<?php 
echo JText::_('AUP_COLLEGE_UNIVERSITY');
?>
">
					<?php 
echo JText::_('AUP_COLLEGE_UNIVERSITY');
?>
:
				</span>
			</div>
コード例 #12
0
ファイル: register.php プロジェクト: DopaSensei/BuyYourMusic
    </div>

    <div class="form-group">
        <label class="control-label col-sm-2" for="city">Ville : </label>
        <div class="col-sm-8">
            <input class="form-control" name="city" id="city" placeholder="ex : Paris">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-sm-2" for="country">Pays : </label>
        <div class="col-sm-8">
            <select class="form-control" name="country" id="country">
                <?php 
echo getCountryList($bdd);
?>
            </select>
        </div>
    </div>


    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
            <button type="submit" class="btn btn-default">Inscription</button>
        </div>
    </div>
</form>

</body>
</html>
コード例 #13
0
 public function test_getCountryList()
 {
     $arr = getCountryList();
     $this->assertEquals($arr['AD'], "Andorra");
 }
コード例 #14
0
/**
 * tries to fetch location information out of text in html
 */
function getLocation($href)
{
    global $counter;
    $unknown = array('country' => 'unknown', 'continent' => 'unknown');
    if (!$href || $href == "") {
        return $unknown;
    }
    // check store for known
    $store = getData("* FROM swdata where link LIKE '{$href}'");
    if ($store && count(array_diff_assoc($store, $unknown))) {
        return array('country' => $store[0]['country'], 'continent' => $store[0]['continent']);
    }
    $counter++;
    $list = getCountryList();
    $html = scraperWiki::scrape("http://www.who.int/{$href}");
    $dom = new simple_html_dom();
    $dom->load($html);
    // seek location in text
    foreach ($dom->find("div[@id='primary']") as $data) {
        $text = removeSpecialChars(strtolower($data->plaintext));
        // tries to find a country name in the text
        foreach ($list as $key => $value) {
            // stripos = case insensitive strpos
            if (stripos($text, $key) !== false) {
                return array('country' => $key, 'continent' => $value);
            }
        }
    }
    // seek location in link
    foreach ($dom->find("div[@id='primary'] a") as $data) {
        $result = getLocation($data->href);
        if (count(array_diff_assoc($result, $unknown))) {
            return $result;
        }
    }
    return $unknown;
}
コード例 #15
0
ファイル: Vendor.php プロジェクト: JasoonS/SebastianServer
 public function index()
 {
     $this->data['title'] = 'Available Vendor List';
     $this->data['countrylist'] = getCountryList();
     $this->template->load('page_tpl', 'vendor_list_vw', $this->data);
 }
コード例 #16
0
 /**
  * Loads the data for the node from the database
  *
  * @param String $style (optional - default 'long') may be 'short' or 'long' or 'mini' or 'full' or 'shortactivity' (mini used for graphs)
  * 'mini' include the base information like name, description, role, user, private, creation and modifications dates, connectedness, image, thumb.
  * 'short' includes 'mini' plus address information, start and end date, otherconnections, userfollow.
  * 'long' includes 'short' and associated website objects, tag objects, group onjects, votes, view counts and extra properties.
  * 'full' includes 'long' and all activity and voting data. This is likely to be very heavy. Use wisely.
  * 'shortactivity' includes 'short' plus the activity and voting data.
  * 'cif' just what is needed for cif.
  * @return Node object (this)
  */
 function load($style = 'long')
 {
     global $DB, $CFG, $USER, $ERROR, $HUB_FLM, $HUB_SQL;
     try {
         $this->canview();
     } catch (Exception $e) {
         return access_denied_error();
     }
     $this->style = $style;
     $params = array();
     $params[0] = $this->nodeid;
     $resArray = $DB->select($HUB_SQL->DATAMODEL_NODE_SELECT, $params);
     if ($resArray !== false) {
         $count = count($resArray);
         if ($count == 0) {
             $ERROR = new error();
             $ERROR->createNodeNotFoundError($this->nodeid);
             return $ERROR;
         } else {
             for ($i = 0; $i < $count; $i++) {
                 $array = $resArray[$i];
                 $this->name = stripslashes(trim($array['Name']));
                 $this->creationdate = $array['CreationDate'];
                 $this->modificationdate = $array['ModificationDate'];
                 if (isset($array['NodeTypeID'])) {
                     $this->role = new Role($array['NodeTypeID']);
                     $this->role = $this->role->load();
                 }
                 if (trim($array['Description']) != "") {
                     $this->hasdesc = true;
                 }
                 if ($style == 'long' || $style == 'cif') {
                     $this->description = stripslashes(trim($array['Description']));
                 }
                 $this->users = array();
                 if ($style == 'cif') {
                     //CIF does not need the whole user info at present
                     // or just userid at this level?
                     $this->users[0] = new User($array['UserID']);
                 } else {
                     $maps = getMapsForNode($this->nodeid, 0, 0);
                     $this->mapcount = $maps->totalno;
                     $this->connectedness = $array['connectedness'];
                     $this->private = $array['Private'];
                     $this->users[0] = getUser($array['UserID'], $style);
                     if ($array['Image']) {
                         $this->filename = $array['Image'];
                         $imagedir = $HUB_FLM->getUploadsNodeDir($this->nodeid, $array['UserID']);
                         $originalphotopath = $HUB_FLM->createUploadsDirPath($imagedir . "/" . stripslashes($array['Image']));
                         if (file_exists($originalphotopath)) {
                             $this->image = $HUB_FLM->getUploadsWebPath($imagedir . "/" . stripslashes($array['Image']));
                             $this->thumb = $HUB_FLM->getUploadsWebPath($imagedir . "/" . str_replace('.', '_thumb.', stripslashes($array['Image'])));
                             if (!file_exists($this->thumb)) {
                                 create_image_thumb($array['Image'], $CFG->IMAGE_THUMB_WIDTH, $imagedir);
                             }
                         } else {
                             if ($this->role->name == 'Map') {
                                 $this->image = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_ISSUE_PHOTO);
                                 $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_ISSUE_PHOTO)));
                             }
                         }
                     } else {
                         if ($this->role->name == 'Map') {
                             $this->image = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_ISSUE_PHOTO);
                             $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_ISSUE_PHOTO)));
                         }
                     }
                     //if(isset($array['Image'])){
                     //    $this->imageurlid = $array['Image'];
                     //}
                     //if(isset($array['ImageThumbnail'])){
                     //    $this->thum = $array['ImageThumbnail'];
                     //}
                     if ($style != 'mini') {
                         if (isset($array['StartDate']) && $array['StartDate'] != 0) {
                             $this->startdatetime = $array['StartDate'];
                         }
                         if (isset($array['EndDate']) && $array['EndDate'] != 0) {
                             $this->enddatetime = $array['EndDate'];
                         }
                         if (isset($array['LocationText'])) {
                             $this->location = $array['LocationText'];
                         } else {
                             $this->location = '';
                         }
                         if (isset($array['LocationCountry'])) {
                             $cs = getCountryList();
                             $this->countrycode = $array['LocationCountry'];
                             if (isset($cs[$array['LocationCountry']])) {
                                 $this->country = $cs[$array['LocationCountry']];
                             }
                         }
                         if (isset($array['LocationLat'])) {
                             $this->locationlat = $array['LocationLat'];
                         }
                         if (isset($array['LocationLng'])) {
                             $this->locationlng = $array['LocationLng'];
                         }
                         if (isset($array['LocationAddress1'])) {
                             $this->locationaddress1 = $array['LocationAddress1'];
                         }
                         if (isset($array['LocationAddress2'])) {
                             $this->locationaddress2 = $array['LocationAddress2'];
                         }
                         if (isset($array['LocationPostCode'])) {
                             $this->locationpostcode = $array['LocationPostCode'];
                         }
                         if (isset($array['AdditionalIdentifier'])) {
                             $this->identifier = $array['AdditionalIdentifier'];
                         }
                         if (isset($array['CurrentStatus'])) {
                             $this->status = $array['CurrentStatus'];
                         }
                     }
                 }
             }
         }
     } else {
         return database_error();
     }
     $currentuser = '';
     if (isset($USER->userid)) {
         $currentuser = $USER->userid;
     }
     if ($style != 'mini' && $style != 'cif') {
         $params = array();
         $params[0] = $this->nodeid;
         $params[1] = $this->nodeid;
         $params[2] = $currentuser;
         $resArray = $DB->select($HUB_SQL->DATAMODEL_NODE_EXTERNAL_CONNECTIONS, $params);
         if ($resArray !== false) {
             if (count($resArray) > 0) {
                 $this->otheruserconnections = $resArray[0]['connectedness'];
             } else {
                 $this->otheruserconnections = 0;
             }
         }
         $this->userfollow = "N";
         //load the current user's following status for this node if any
         $params = array();
         $params[0] = $currentuser;
         $params[1] = $this->nodeid;
         $resArray = $DB->select($HUB_SQL->DATAMODEL_NODE_USER_FOLLOW, $params);
         if ($resArray !== false) {
             if (count($resArray) > 0) {
                 $this->userfollow = "Y";
             }
         }
     }
     if ($style == 'long' || $style == 'full' || $style == 'cif') {
         $this->loadWebsites($style);
     }
     if ($style == 'long' || $style == 'full') {
         $this->loadTags();
         $this->loadGroups();
         $this->loadVotes();
         $this->loadProperties();
         $this->loadViewCount();
     }
     if ($style == 'full' || $style == 'shortactivity') {
         $this->activity = getAllNodeActivity($this->nodeid, 0, 0, -1);
         $this->votes = getVotes($this->nodeid);
     }
     //load comments, pro count and con count if Solution.
     /*if ($this->role->name == "Solution") {
     			$this->haschildren = 'N';
     			$conSetKids = getConnectionsByNode($this->nodeid,0,0,'date','ASC', 'all', '', 'Pro,Con,Comment');
     			if (!$conSetKids instanceof Error) {
     				if ($conSetKids->totalno > 0) {
     					$this->haschildren = 'Y';
     				}
     			} else {
     				return database_error();
     			}
     		}*/
     return $this;
 }
コード例 #17
0
            }
        } else {
            $formNotice[] = 'emailExists';
        }
        // Email already exists in the system
    }
}
try {
    $smarty->assign('form', $form);
    // Assign values to prefill the form
    //$captcha = recaptcha_get_html($publickey);
    //$smarty->assign('captcha',$captcha);
    /*
     * Get countries list
     */
    $smarty->assign('countries', getCountryList($selectedLanguage));
    /*
     * Get states only if $country is passed
     */
    if ($_POST['country']) {
        $stateResult = mysqli_query($db, "SELECT * FROM {$dbinfo[pre]}states WHERE active = 1 AND deleted = 0 AND country_id = '{$_POST[country]}'");
        // Select states
        while ($state = mysqli_fetch_array($stateResult)) {
            $states[$state['state_id']] = $state['name'];
            // xxxxx languages
        }
        $smarty->assign('states', $states);
    }
    /*
    if(preg_match("/[^A-Za-z0-9_-]/",$msID))
    {
コード例 #18
0
<link rel="stylesheet" media="all" type="text/css" href="<?php 
echo BASEURL;
?>
admin-img-css-js/datepicker/jquery-ui-timepicker-addon.css" />

<script type="text/javascript" src="<?php 
echo BASEURL;
?>
admin-img-css-js/datepicker/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="<?php 
echo BASEURL;
?>
admin-img-css-js/datepicker/jquery-ui-sliderAccess.js"></script>

<?php 
$countryList = getCountryList();
?>
<!-- Validation form -->
        <form id="validate" name="validate" class="form" method="post" action="">
            <input type="hidden" name="student_id" value="<?php 
echo $sinfo['student_id'];
?>
" />
            <input type="hidden" name="old_display_id" value="<?php 
echo $sinfo['old_display_id'];
?>
" />
            <fieldset>
                <div class="widget">
                    <div class="title"><h6>Create Student</h6></div>
                        
コード例 #19
0
ファイル: OrisFunctions.php プロジェクト: brian-nelson/ianseo
function getCountriesList($ORIS = '')
{
    $Data = new StdClass();
    $Data->Code = 'C32E';
    $Data->Order = '2';
    $Data->Description = 'List of Countries';
    $Data->Header = array("", "NOC", "Country");
    $Data->HeaderWidth = array(10, 20, 160);
    $Data->Phase = '';
    $Data->Data = array();
    $Data->Data['Fields'] = array('Nation' => get_text('Country'));
    if ($ORIS) {
        $Data->Data['Fields']['NationCode'] = 'NOC';
    } else {
        $Data->Description = get_text('ListCountries', 'Tournament');
    }
    $MyQuery = getCountryList($ORIS);
    //echo $MyQuery;exit;
    $Rs = safe_r_sql($MyQuery);
    while ($MyRow = safe_fetch($Rs)) {
        $Data->Data['Items'][$MyRow->NationCode][] = $MyRow;
    }
    return $Data;
}