This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cat_build_stat($category_id) { | |
global $lep; | |
$children = cat_get_children($category_id); | |
$children[] = $category_id; | |
$children_str = implode(', ',$children); | |
$query = "select count(res_id) from lep_resource where category_id in ($children_str) and suspended = 0 and status = 1"; | |
$num_res = $lep->db->GetOne($query); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function w_dir_stat($option) { | |
global $lep; | |
$param = etc_read_option($option); | |
$query = "select count(res_id) as count from lep_resource where status = 1 and suspended = 0"; | |
$active_links = $lep->db->GetOne($query); | |
$query = "select count(res_id) as count from lep_resource where status = 0"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
if($('select[name=add_cat1] option:selected').val()==0 && | |
$('select[name=add_cat2] option:selected').val()==0 && | |
$('select[name=add_cat3] option:selected').val()==0 && | |
$('select[name=add_cat4] option:selected').val()==0 && | |
$('select[name=add_cat5] option:selected').val()==0 && | |
$('select[name=add_cat6] option:selected').val()==0 && | |
$('select[name=add_cat7] option:selected').val()==0 && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
/**************** app setting ****************/ | |
// wordpress url | |
"BLOG_URL" : "http://www.dodyrw.com/wpappdemo/", | |
// webmaster email | |
"WEBMASTER_EMAIL" : "webmaster@domain.com", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The following snippet will ask the user to rate your app the second time they launch it. | |
* It lets the user rate it now, "Remind Me Later" or never rate the app. | |
*/ | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
win.addEventListener('open', checkReminderToRate); | |
win.add(Ti.UI.createLabel({ text: 'This is a simple app that will remind you to rate it.' })); | |
win.open(); | |
function checkReminderToRate() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dial number: #777 | |
Username : smart | |
Password : smart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
div#map{ width:750px; height:500px; } | |
</style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$address = "Sutorejo Utara, Surabaya, Indonesia"; | |
$address = urlencode($address); | |
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=false"; | |
$raw = file_get_contents($url); | |
$data = json_decode($raw); | |
$lat = $data->results[0]->geometry->location->lat; | |
$lng = $data->results[0]->geometry->location->lng; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone remotegitrepository | |
git init | |
git add foldername | |
git branch branchname | |
git checkout fileorbranchname | |
git remote add remotegitrepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git add foldername |
OlderNewer