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
tablename: bdates | |
fields: bday (date: only month and day), name (vchar - 25), IP (vchar - 20) | |
1. Show to all: | |
$today = date("m/d"); // get today's date (month and day only!) | |
$sql = "select * from `bdates` where `bday`='".$today."'"; | |
$list = mysql_query($sql); | |
while ($lst = mysql_fetch_array($list)) | |
{ | |
echo ("Happy birthday " . $lst['name'] . "!<br>"); |
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 GetRow($keyword) | |
{ | |
$this->db->like("hotel_name", $keyword); | |
$data= $this->db->get('hotels')->result_array(); | |
$check=count($data); | |
if($check==0) | |
{ | |
$this->db->like("hotel_name", $keyword); | |
return $this->db->get('gallery')->result_array(); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
# slashes. | |
# If your page resides at | |
# http://www.example.com/mypage/test1 | |
# then use | |
# RewriteBase /mypage/test1/ | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f |
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> | |
<meta charset="utf-8"> | |
<title>OFFICIUM247-Home</title> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
<link href="css/main.css" rel="stylesheet"> | |
<link href="css/demo.css" rel="stylesheet"> | |
<link href="css/style.css" rel="stylesheet"> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script> |
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 | |
include 'include/connect.php'; | |
$tableqry = "SELECT image,maincat_name,php_name FROM tblmaincategories "; | |
$num_rows = mysql_num_rows(mysql_query("SELECT image,maincat_name,php_name FROM tblmaincategories ")); | |
$result = mysql_query($tableqry); | |
?> | |
<html> | |
<head> | |
<meta charset="utf-8"> |
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 | |
/** | |
* Written by Amri Shodiq. | |
* Do not hesitate to copy and paste this code. | |
* It's not embarassing. | |
*/ | |
if (!defined('BASEPATH')) | |
exit ('No direct script access allowed'); |
This file has been truncated, but you can view the full file.
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
-- phpMyAdmin SQL Dump | |
-- version 4.2.11 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: 127.0.0.1 | |
-- Generation Time: Dec 13, 2015 at 10:50 AM | |
-- Server version: 5.6.21 | |
-- PHP Version: 5.5.19 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
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"> | |
$('table.paginated').each(function() { | |
var currentPage = 0; | |
var numPerPage = 10; | |
var $table = $(this); | |
$table.bind('repaginate', function() { | |
$table.find('tbody tr').hide().slice(currentPage * numPerPage, (currentPage + 1) * numPerPage).show(); | |
}); | |
$table.trigger('repaginate'); | |
var numRows = $table.find('tbody tr').length; |
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 | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; | |
$dbname = "test"; | |
// Create connection | |
$conn = mysqli_connect($servername, $username, $password, $dbname); | |
// Check connection |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Capture Photo</title> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/> | |
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var pictureSource; // picture source | |
var destinationType; // sets the format of returned value |
OlderNewer