Esempio n. 1
0
function form_mercado_pago()
{
    if (get_option('mercadopago_url_sucess') != '') {
        $url_sucess = get_option('mercadopago_url_sucess');
    } else {
        $url_sucess = get_site_url();
    }
    if (get_option('mercadopago_url_pending') != '') {
        $url_pending = get_option('mercadopago_url_pending');
    } else {
        $url_pending = get_site_url();
    }
    $output = '<br /><tr><td>';
    $output .= 'Client Id</td>';
    $output .= '<td><input name="mercadopago_client_id" type="text" value="' . get_option('mercadopago_client_id') . '"/></td></tr>';
    $output .= '<tr><td>Client Secret</td>';
    $output .= '<td><input name="mercadopago_client_secret" type="text" value="' . get_option('mercadopago_client_secret') . '"/></td></tr>';
    $output .= '<tr><td></td><td><small>To get fields above, follow: 
		<a href="https://www.mercadopago.com/mla/herramientas/aplicaciones" target="_blank">Argentina</a> or
		<a href="https://www.mercadopago.com/mlb/ferramentas/aplicacoes" target="_blank">Brasil</a> or <a href="https://www.mercadopago.com/mlm/herramientas/aplicaciones" target="_blank">Mexico</a> or <a href="https://www.mercadopago.com/mlv/herramientas/aplicaciones" target="_blank">Venezuela</a> <br /><br /></small></td></tr>';
    $output .= '<tr><td>Store Category</td>';
    $output .= '<td>' . category() . '</td></tr>';
    $output .= '<tr><td>Type Checkout</td>';
    $output .= '<td>' . type_checkout() . '</td></tr>';
    $output .= '<tr><td>Sandbox</td>';
    $output .= '<td>' . sandbox() . '</td></tr>';
    $output .= '<tr><td>Url Sucess Payment</td>';
    $output .= '<td><input name="mercadopago_url_sucess" type="text" value="' . $url_sucess . '"/></td></tr>';
    $output .= '<tr><td>Url Peding Payment</td>';
    $output .= '<td><input name="mercadopago_url_pending" type="text" value="' . $url_pending . '"/></td></tr>';
    $output .= '<tr><td></td><td><small>This is just the url where the custumer is redirect after his payment is done, you can set in both fields above any url of your site, but needs to be a <b>valid URL.</b>.<br /><br /> Please set your <b>instant payment notification</b> to receive your automatic order status changes at: 
		<a href="https://www.mercadopago.com/mla/herramientas/notificaciones" target="_blank">Argentina</a> or
		<a href="https://www.mercadopago.com/mlb/ferramentas/notificacoes" target="_blank">Brasil</a> or <a href="https://www.mercadopago.com/mlm/herramientas/notificaciones" target="_blank">Mexico</a> or <a href="https://www.mercadopago.com/mlv/herramientas/notificaciones" target="_blank">Venezuela</a><br />
		Set your url follwing this exemple: http://yourstore.com</b></small></td></tr>';
    $output .= '<tr><td>Store Country</td>';
    $output .= '<td>' . country() . '</td></tr>';
    $output .= '<tr><td>Currency</td>';
    $output .= '<td>' . currency() . '</td></tr>';
    $output .= '<tr><td></td><td><small>Select Real to Brasil, or Pesos or Dollar to Argentina</small></td></tr>';
    $output .= '<tr><td>Excluded methods</td>';
    $output .= '<td>' . methods(get_option('mercadopago_country')) . '</td></tr>';
    $output .= '<tr><td></td><td><small>SELECT only the methods that you <b>DO NOT</b>want to accept by MercadoPago<br />
		<br /><b>Attention: </b> Payment methods depends on what country your account was created, if you change the country,<b> save the module first</b> and just after that select the Exclude Payment Methods!
		<br /><br /><b>DO NOT</b> exclude All methods<br /><br /></small></td></tr>';
    $output .= '<tr><td>Limit Payments</td>';
    $output .= '<td>' . instalments() . '</td></tr>';
    $output .= '<tr><td></td><td><small>This option allow you to limit the maximum number of instalments of MercadoPago</small></td></tr>';
    $output .= '<tr><td>Debug mode</td>';
    $output .= '<td>' . debugs() . '</td></tr>';
    $output .= '<tr><td></td><td><small>Turn debug mode on to see erro log with your getting error on checkout</small></td></tr>';
    return $output;
}
Esempio n. 2
0
function all_city($user, $pass)
{
    global $db_hotel;
    $country = json_decode(country(), TRUE);
    foreach ($country as $country_id => $country_detail) {
        $return[$country_id] = $country_detail;
        $query = "SELECT * FROM pub_city WHERE country_id={$country_id} ";
        $query = $db_hotel->query($query);
        $return[$country_id]['city'] = array();
        while ($city = $query->fetch_assoc()) {
            $return[$country_id]['city'][$city['id']]['name'] = $city['name'];
            $return[$country_id]['city'][$city['id']]['en_name'] = $city['en_name'];
            $return[$country_id]['city'][$city['id']]['lat'] = $city['lat'];
            $return[$country_id]['city'][$city['id']]['long'] = $city['lon'];
            //                $return[$city['id']]['tz'] = $city['tz'];
        }
    }
    //    $country_id = $country_id->country_id;
    $db_hotel->close();
    return json_encode($return);
}
        //        if($pram == $key ){
        //             $option .= '<option selected>'. $value .'</option>';
        //        } else {
        //             $option .= '<option>'. $value .'</option>';
        //        }
        $option .= '<option';
        $option .= $pram == $key ? ' selected' : '';
        $option .= '>' . $value . '</option>';
    }
    return $option;
}
// CallBack with Argument
?>

Select Country <select><?php 
echo country(2);
?>
<</select>



<?php 
/*
 * 
function Math($Digit){
    echo $Digit;
}

$value = Math(9);

Esempio n. 4
0
 /**
  * A validation rule that checks the validity of a country.
  *
  * @param  string  $attribute
  * @param  mixed  $value
  * @param  array  $parameters
  * @return void
  */
 public function validateCountry($attribute, $value, array $parameters)
 {
     return (bool) country($value);
 }
Esempio n. 5
0
                              <input type="text" name="su_phone" class="field-long" placeholder="enter your phone number" size="50" required />
                            </li>
                            <li>
                                <label>Street Address</label>
                              <input type="text" name="su_address" class="field-long" placeholder="enter your Street Address" size="50" />
                            </li>
                            <li>
                                <label>City <span class="required">*</span></label>
                              <input type="text" name="su_city" class="field-long" placeholder="enter your city name" size="50" required />
                            </li>
                            <li>
                                <label>Country <span class="required">*</span></label>                  
                                <select name="su_country" class="field-divided" required>
                                  <option value="">Select One</option>
                                  <?php 
$country_list = country();
foreach ($country_list as $key => $value) {
    if (!empty($value)) {
        echo "<option>" . $value . "</option>";
    }
}
?>
                                </select>
                            </li>
                            <li>
                                <label>Website</label>
                              <input type="url" name="su_url" class="field-long" placeholder="enter website url" size="50" />
                            </li>
                            <li>
                                <label>Gender <span class="required">*</span></label>
                              <select name="su_gender" class="field-divided" required>
    echo birthdate($testi->ID);
    ?>
</dd>
									  <dt>Weight</dt>
									  <dd><?php 
    echo weight($testi->ID);
    ?>
</dd>
									  <dt>Height</dt>
									  <dd><?php 
    echo height($testi->ID);
    ?>
</dd>
									  <dt>Country</dt>
									  <dd><?php 
    echo country($testi->ID);
    ?>
</dd>
									  <dt>Shaft</dt>
									  <dd><?php 
    echo shaft($testi->ID);
    ?>
</dd>
									</dl>
								</div>
								<div class="col-md-8">
									<h4>Testimonial</h4>
									<?php 
    echo $testi->post_content;
    ?>
								</div>
Esempio n. 7
0
 }
 echo '<tr><td>' . __('Total number of visited families:') . '</td><td>' . $total . '</td>';
 // Visitors per day/ month/ year.
 // 1 day = 86400
 $time_period = strtotime("now") - 3600;
 // 1 hour
 $datasql = $dbh->query("SELECT * FROM humo_stat_date WHERE stat_date_linux > " . $time_period);
 if ($datasql) {
     $total = $datasql->rowCount();
 }
 echo '<tr><td>' . __('Total number of families in the last hour:') . '</td><td>' . $total . '</td>';
 echo '</table>';
 //******** START COUNTRY STATISTICS (second file check for test) *************
 if (file_exists(CMS_ROOTPATH_ADMIN . "ip_files") or file_exists("../../humo-gen ip_files")) {
     echo '<br><b>' . __('Unique visitors - Country of origin') . '</b><br>';
     country();
 }
 //******** END COUNTRY STATISTICS ********
 $nr_lines = 15;
 // *** Nr. of statistics lines ***
 $family_qry = $dbh->query("SELECT *, count(humo_stat_date.stat_easy_id) as count_lines\n\t\tFROM humo_stat_date, humo_trees\n\t\tWHERE humo_trees.tree_id=humo_stat_date.stat_tree_id\n\t\tGROUP BY humo_stat_date.stat_easy_id desc\n\t\tORDER BY count_lines desc\n\t\tLIMIT 0," . $nr_lines);
 echo '<h2 align="center">' . $nr_lines . ' ' . __('Most visited families:') . '</h2>';
 echo '<table class="humo standard" border="1" cellspacing="0">';
 echo '<tr class="table_header"><th>#</th><th>' . __('family tree') . '</th><th>' . __('family') . '</th></tr>';
 while ($familyDb = $family_qry->fetch(PDO::FETCH_OBJ)) {
     statistics_line($familyDb);
 }
 echo '</table>';
 $family_qry = $dbh->query("SELECT * FROM humo_stat_date, humo_trees\n\t\tWHERE humo_trees.tree_id=humo_stat_date.stat_tree_id\n\t\tORDER BY humo_stat_date.stat_date_stat DESC LIMIT 0," . $nr_lines);
 echo '<h2 align="center">' . $nr_lines . ' ' . __('last visited families:') . '</h2>';
 echo '<table class="humo standard" border="1" cellspacing="0">';
Esempio n. 8
0
    </center>
    <div class="col-md-6">
        <div class="content-box-header">
            <div class="panel-title"> {{trans("log.countryAccess")}}</div>
        </div>
        <div class="content-box-large box-with-header" style="overflow: auto; height:350px ;width: 100%;">
            <table class='table table-condensed table-striped' >
                <thead>
                    <tr>
                        <th>{{trans('log.country')}}</th>
                        <th>{{trans('log.accesses')}}</th>
                    </tr>
                </thead>
                <tbody>
                    <?php 
foreach (country() as $country) {
    ?>
                        <tr>
                            <td>{{$country['country']}}</td>
                            <td>{{$country['value']}}</td>
                        </tr>
                    <?php 
}
?>
                </tbody>
            </table>
        </div>
    </div>

</div>
@stop
Esempio n. 9
0
 /**
  * Retrieve the requested country.
  *
  * @return \Apolune\Contracts\Server\Country
  */
 public function requestCountry()
 {
     return country($this->request_country);
 }
Esempio n. 10
0
 public static function determine_language()
 {
     // If multilanguage, determine current language. Redirect to appropriate language if unable to determine.
     if (count(languages()) > 1) {
         $language_codes = array_keys(languages());
         if ($countries = Config::countries()) {
             $language_codes = array_keys($countries);
         }
         $language_values = languages();
         if ($countries) {
             $language_values = $countries;
         }
         $site = current_site();
         $url_key = 'url_' . reset($language_codes);
         if ($site->{$url_key} && false === stristr($_SERVER['HTTP_HOST'], '.fw4.be')) {
             foreach ($language_codes as $lang) {
                 $url_key = 'url_' . $lang;
                 if ($_SERVER['HTTP_HOST'] == $site->{$url_key}) {
                     if ($countries) {
                         self::set_language($countries[$lang]);
                         self::set_country($lang);
                     } else {
                         self::set_language($lang);
                     }
                     break;
                 }
             }
         } else {
             foreach ($language_codes as $lang) {
                 if (segment(0) == $lang) {
                     if ($countries) {
                         self::set_country(array_shift(self::$segments));
                         self::set_language($countries[country()]);
                     } else {
                         self::set_language(array_shift(self::$segments));
                     }
                     break;
                 }
             }
         }
         if (!language()) {
             if (isset($_COOKIE['language']) && isset($language_values[$_COOKIE['language']])) {
                 $language = $_COOKIE['language'];
             } else {
                 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && ($negotiated = self::prefered_language($language_codes))) {
                     $language = $negotiated;
                 } else {
                     $language = array_shift($language_codes);
                 }
             }
             if ($countries) {
                 self::set_country($language);
                 self::set_language($countries[$language]);
             } else {
                 self::set_language($language);
             }
             return false;
         }
         if (!isset($_COOKIE['language']) || $_COOKIE['language'] != language_identifier()) {
             setcookie('language', language_identifier(), time() + 60 * 60 * 24 * 30 * 24, '/');
         }
     } else {
         $languages = array_keys(languages());
         self::set_language(array_shift($languages));
         // If single language, define it.
     }
     return true;
 }
Esempio n. 11
0
/**
 * Template_Lite  function plugin
 *
 */
function tpl_function_country($params, &$tpl)
{
    $tpl->CI->load->helper('countries');
    return country($params['id_country'], $params['id_region'], $params['id_city']);
}
Esempio n. 12
0
	<div class="heading">
		<h1>Find Country Capital</h1>
		<div class="sub-heading">
			<p>By Somen Banerjee<!-- [somen][dot][banerjee][0][@][gmail][.][com] --></p>
		</div>
	</div>
	<div class="main-panel">
		<div class="input-panel">
			<form action="" method="post">
				<input type="text" name="countryName" placeholder="Enter Country Name">
				<button type="submit" name="submit">Find</button>
			</form>
		</div>

			<?php 
$row = country();
// function calling
?>
			<?php 
if (!empty($row)) {
    ?>
			<div class="output-panel">
			<div class="panel-heading">
				<h1>Result</h1>
			</div>
			<?php 
    foreach ($row as $key => $value) {
        //print_r($row);
        ?>

			<div class="panel-body">