コード例 #1
0
 public static function blog_keywords_Insert($blog_id, $keyword)
 {
     $sql = 'CALL `sp_blog_keywords_Insert`(:blog_id, :keyword)';
     $params = array(':blog_id' => $blog_id, ':keyword' => $keyword);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #2
0
 public static function favorite_user_Insert($favorite_blog, $user_id)
 {
     $sql = 'CALL `sp_favorite_user_Insert`(:favorite_blog, :user_id)';
     $params = array(':favorite_blog' => $favorite_blog, ':user_id' => $user_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #3
0
 public static function admins_Insert($first_name, $last_name, $password, $mobile, $about, $roles_id)
 {
     $sql = 'CALL `sp_admins_Insert`(:first_name, :last_name, :password, :mobile, :about, :roles_id)';
     $params = array(':first_name' => $first_name, ':last_name' => $last_name, ':password' => $password, ':mobile' => $mobile, ':about' => $about, ':roles_id' => $roles_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #4
0
ファイル: USERS.php プロジェクト: pooya-alen1990/sampleTalent
 public static function users_Insert($first_name, $last_name, $password, $job_title, $gender, $marriage_state, $profile_pic, $cover_pic, $birthday, $mobile, $tel, $address, $email, $website, $job_state, $job_kind, $salary, $city_id, $about_me, $register_date)
 {
     $sql = 'CALL `sp_users_Insert`(:first_name, :last_name, :password, :job_title, :gender, :marriage_state, :profile_pic, :cover_pic, :birthday, :mobile, :tel, :address, :email, :website, :job_state, :job_kind, :salary, :city_id, :about_me, :register_date)';
     $params = array(':first_name' => $first_name, ':last_name' => $last_name, ':password' => $password, ':job_title' => $job_title, ':gender' => $gender, ':marriage_state' => $marriage_state, ':profile_pic' => $profile_pic, ':cover_pic' => $cover_pic, ':birthday' => $birthday, ':mobile' => $mobile, ':tel' => $tel, ':address' => $address, ':email' => $email, ':website' => $website, ':job_state' => $job_state, ':job_kind' => $job_kind, ':salary' => $salary, ':city_id' => $city_id, ':about_me' => $about_me, ':register_date' => $register_date);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #5
0
 public static function educations_Insert($user_id, $education_level, $education_average, $education_university, $education_branch, $education_sub_branch, $from_date, $to_date, $now, $activities, $attach_file)
 {
     $sql = 'CALL `sp_educations_Insert`(:user_id, :education_level, :education_average, :education_university, :education_branch, :education_sub_branch, :from_date, :to_date, :now, :activities, :attach_file)';
     $params = array(':user_id' => $user_id, ':education_level' => $education_level, ':education_average' => $education_average, ':education_university' => $education_university, ':education_branch' => $education_branch, ':education_sub_branch' => $education_sub_branch, ':from_date' => $from_date, ':to_date' => $to_date, ':now' => $now, ':activities' => $activities, ':attach_file' => $attach_file);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #6
0
 public static function blog_audience_Insert($audience_name)
 {
     $sql = 'CALL `sp_blog_audience_Insert`(:audience_name)';
     $params = array(':audience_name' => $audience_name);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #7
0
ファイル: BLOGS.php プロジェクト: pooya-alen1990/sampleTalent
 public static function blogs_Insert($title, $title_en, $image, $text, $source, $video, $description, $read_time, $hit_count, $admin_id, $add_time, $modify_time, $activate)
 {
     $sql = 'CALL `sp_blogs_Insert`(:title, :title_en, :image, :text, :source, :video, :description, :read_time, :hit_count, :admin_id, :add_time, :modify_time, :activate)';
     $params = array(':title' => $title, ':title_en' => $title_en, ':image' => $image, ':text' => $text, ':source' => $source, ':video' => $video, ':description' => $description, ':read_time' => $read_time, ':hit_count' => $hit_count, ':admin_id' => $admin_id, ':add_time' => $add_time, ':modify_time' => $modify_time, ':activate' => $activate);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #8
0
 public static function rolespermissions_Insert($roles_id, $permissions_id)
 {
     $sql = 'CALL `sp_rolespermissions_Insert`(:roles_id, :permissions_id)';
     $params = array(':roles_id' => $roles_id, ':permissions_id' => $permissions_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #9
0
 public static function authors_Insert($full_name)
 {
     $sql = 'CALL `sp_authors_Insert`(:full_name)';
     $params = array(':full_name' => $full_name);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #10
0
 public static function permissions_Insert($title, $ENtitle)
 {
     $sql = 'CALL `sp_permissions_Insert`(:title, :ENtitle)';
     $params = array(':title' => $title, ':ENtitle' => $ENtitle);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #11
0
ファイル: ROLES.php プロジェクト: pooya-alen1990/sampleTalent
 public static function roles_Insert($title)
 {
     $sql = 'CALL `sp_roles_Insert`(:title)';
     $params = array(':title' => $title);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #12
0
 public static function quotations_Insert($author, $text)
 {
     $sql = 'CALL `sp_quotations_Insert`(:author, :text)';
     $params = array(':author' => $author, ':text' => $text);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #13
0
ファイル: B_A.php プロジェクト: pooya-alen1990/sampleTalent
 public static function b_a_Insert($blog_id, $audience_id)
 {
     $sql = 'CALL `sp_b_a_Insert`(:blog_id, :audience_id)';
     $params = array(':blog_id' => $blog_id, ':audience_id' => $audience_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #14
0
 public static function comments_Insert($full_name, $mail, $text, $add_time, $activate, $ip, $user_id, $admin_id, $blog_id, $comment_id)
 {
     $sql = 'CALL `sp_comments_Insert`(:full_name, :mail, :text, :add_time, :activate, :ip, :user_id, :admin_id, :blog_id, :comment_id)';
     $params = array(':full_name' => $full_name, ':mail' => $mail, ':text' => $text, ':add_time' => $add_time, ':activate' => $activate, ':ip' => $ip, ':user_id' => $user_id, ':admin_id' => $admin_id, ':blog_id' => $blog_id, ':comment_id' => $comment_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #15
0
 public static function blog_subject_Insert($subject_name)
 {
     $sql = 'CALL `sp_blog_subject_Insert`(:subject_name)';
     $params = array(':subject_name' => $subject_name);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
コード例 #16
0
 public static function checkBox($table, $idField, $titleField, $elementName, $whereClause = '', $cssClass = '', $onClick = '')
 {
     DatabaseHandler::Execute("SET NAMES UTF8;");
     $sql = "SELECT * FROM {$table} {$whereClause}";
     $records = DatabaseHandler::GetAll($sql);
     DatabaseHandler::Close();
     $checkBox = '';
     foreach ($records as $item) {
         $id = $item[$idField];
         $text = $item[$titleField];
         $checkBox .= "<label class='{$cssClass}'><input type='checkbox' name='{$elementName}' id='{$elementName}{$id}' value='{$id}' />{$text}</label>";
     }
     return $checkBox;
 }
コード例 #17
0
ファイル: index.php プロジェクト: huynhchanhuy/tshirtshop
<?php

// Activate session
session_start();
// Include utility files
require_once './include/config.php';
require_once BUSINESS_DIR . 'error_handler.php';
// Set the error handler
ErrorHandler::SetHandler();
// Load the application page template
require_once PRESENTATION_DIR . 'application.php';
require_once PRESENTATION_DIR . 'link.php';
// Link Factory
// Load the database handler
require_once BUSINESS_DIR . 'database_handler.php';
// Load Business Tier
require_once BUSINESS_DIR . 'catalog.php';
// Load Smarty template file
$application = new Application();
// Display the page
$application->display('store_front.tpl');
// Close database connection
DatabaseHandler::Close();
// require_once './test.php';