예제 #1
0
function encoder_redirect_success(City $new_city)
{
    $new_city_name = $new_city->getCity();
    $dir = "VIEW/html/Encoder/Add_Place/Add_Place_City_inc.php?success_edit=1";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
예제 #2
0
function encoder_redirect_success(City $new_city)
{
    $new_city_name = $new_city->getCity();
    $dir = "VIEW/html/Encoder/Add_Place/Add_Place_City_inc.php?success=1&City_Name={$new_city_name}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    //redirect the encoder to the regions add place
    exit;
}
 /**
  * @param City $city
  * @return bool
  * this function takes city as a parameter and add the city to the data base
  * if the city is added to the database it will return true
  * else it will return false
  */
 function Add_City(City $city)
 {
     $City_Name = $city->getCity();
     $City_Name_Amharic = $city->getCityAmharic();
     $query = "INSERT INTO city (Name,Name_Amharic) VALUES('{$City_Name}','{$City_Name_Amharic}')";
     $result = mysqli_query($this->getDbc(), $query);
     if ($result) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
예제 #4
0
<div class="widget-box">
    <div class="widget-header">
        <h5>Details Directory (<?php 
echo $model->title;
?>
)</h5>
        <div class="widget-toolbar">
            <a data-action="settings" href="#"><i class="icon-cog"></i></a>
            <a data-action="reload" href="#"><i class="icon-refresh"></i></a>
            <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
            <a data-action="close" href="#"><i class="icon-remove"></i></a>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-pencil"></i>', array('update', 'id' => $model->id), array('data-rel' => 'tooltip', 'title' => 'Edit', 'data-placement' => 'bottom'));
?>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-plus"></i>', array('create'), array('data-rel' => 'tooltip', 'title' => 'Add', 'data-placement' => 'bottom'));
?>
        </div>
    </div><!--/.widget-header -->
    <div class="widget-body">
        <div class="widget-main">
            <?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array('id', array('name' => 'category', 'type' => 'raw', 'value' => DirectoryCategory::getDirectoryCategory($model->category)), 'title', 'address', 'postcode', array('name' => 'country', 'type' => 'raw', 'value' => Country::getCountry($model->country)), array('name' => 'state', 'type' => 'raw', 'value' => State::getState($model->state)), array('name' => 'city', 'type' => 'raw', 'value' => City::getCity($model->city)), array('name' => 'district', 'type' => 'raw', 'value' => District::getDistrict($model->district)), array('name' => 'thana', 'type' => 'raw', 'value' => Thana::getThana($model->thana)), 'telephone', 'mobile', 'email', 'fax', 'website', 'details', array('name' => 'created_by', 'type' => 'raw', 'value' => UserAdmin::get_user_name($model->created_by)), array('name' => 'created_on', 'type' => 'raw', 'value' => UserAdmin::get_date_time($model->created_on)), array('name' => 'modified_by', 'type' => 'raw', 'value' => UserAdmin::get_user_name($model->modified_by)), array('name' => 'modified_on', 'type' => 'raw', 'value' => UserAdmin::get_date_time($model->modified_on)), array('name' => 'published', 'value' => $model->published ? "Yes" : "No"), 'hits')));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
예제 #5
0
파일: Clue.php 프로젝트: rjwalsh88/BawkApp
 public function getAnswerCity()
 {
     if ($this->answerCityObj == UNPREPARED) {
         $this->answerCityObj = $this->answerCity == null ? null : City::getCity($this->answerCity);
     }
     return $this->answerCityObj;
 }
예제 #6
0
<div class="widget-box">
    <div class="widget-header">
        <h5>Details Thana (<?php 
echo $model->title;
?>
)</h5>
        <div class="widget-toolbar">
            <a data-action="settings" href="#"><i class="icon-cog"></i></a>
            <a data-action="reload" href="#"><i class="icon-refresh"></i></a>
            <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
            <a data-action="close" href="#"><i class="icon-remove"></i></a>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-pencil"></i>', array('update', 'id' => $model->id), array('data-rel' => 'tooltip', 'title' => 'Edit', 'data-placement' => 'bottom'));
?>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-plus"></i>', array('create'), array('data-rel' => 'tooltip', 'title' => 'Add', 'data-placement' => 'bottom'));
?>
        </div>
    </div><!--/.widget-header -->
    <div class="widget-body">
        <div class="widget-main">
            <?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array('id', array('name' => 'country_id', 'type' => 'raw', 'value' => Country::getCountry($model->country_id)), array('name' => 'state_id', 'type' => 'raw', 'value' => State::getState($model->state_id)), array('name' => 'city_id', 'type' => 'raw', 'value' => City::getCity($model->city_id)), array('name' => 'district_id', 'type' => 'raw', 'value' => District::getDistrict($model->district_id)), 'title', array('name' => 'published', 'value' => $model->published ? "Yes" : "No"))));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
예제 #7
0
 function Edit_City(City $City, $City_ID)
 {
     $Name = $City->getCity();
     $Name_Amharic = $City->getCityAmharic();
     $query = "UPDATE City set Name='{$Name}',Name_Amharic='{$Name_Amharic}' where ID='{$City_ID}'";
     $result = mysqli_query($this->getDbc(), $query);
     //if the city is edited return true else return false
     if ($result) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
예제 #8
0
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> State </div>

                                                <div class="profile-info-value">
                                                    <span><?php 
echo State::getState($model_profile->state_id);
?>
</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> City </div>

                                                <div class="profile-info-value">
                                                    <span><?php 
echo City::getCity($model_profile->city_id);
?>
</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> Address </div>

                                                <div class="profile-info-value">
                                                    <span><?php 
echo $model_profile->address;
?>
</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">