当前位置: 首页>>代码示例>>PHP>>正文


PHP base::query方法代码示例

本文整理汇总了PHP中base::query方法的典型用法代码示例。如果您正苦于以下问题:PHP base::query方法的具体用法?PHP base::query怎么用?PHP base::query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在base的用法示例。


在下文中一共展示了base::query方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: register

 public function register($user)
 {
     //验证输入数据合法性
     $error = array();
     preg_match('/^([\\.a-zA-z0-9_-])+@([a-zA-z0-9_-])+((\\.[a-zA-z0-9_-]{2,3}){1,2})$/', $user['email']) || ($error[] = '邮箱格式错误!');
     mysql_num_rows(base::query("SELECT uid FROM 'members' WHERE 'email' = '{$user['email']}'")) == 0 || ($error[] = '该eamil地址已经存在');
 }
开发者ID:Arrray,项目名称:PHPpractice,代码行数:7,代码来源:member.php

示例2: to_local_time_zone

 function to_local_time_zone($timest, $gmt = null)
 {
     $first_arr = explode(" ", $timest);
     $second_arr = explode("-", $first_arr[0]);
     $third_arr = explode(":", $first_arr[1]);
     $year = $second_arr[0];
     $month = $second_arr[1];
     $day = $second_arr[2];
     $hour = $third_arr[0];
     $minute = $third_arr[1];
     $second = $third_arr[2];
     $param_arr = array($_SESSION['user_id']);
     if ($gmt == null) {
         $sel = base::query('SELECT gmt FROM users WHERE id = \'::0::\'', 'assoc_array', $param_arr);
         if (!empty($sel)) {
             $gmt = $sel[0]['gmt'];
         } else {
             $gmt = '+0';
         }
     }
     if ($_SESSION['user_id'] == 1) {
         if (!empty($_COOKIE['gmt'])) {
             $gmt = $_COOKIE['gmt'];
         }
     }
     $timest = date("Y-m-d H:i:s", mktime($hour, $minute, $second, $month, $day, $year) + $gmt * 3600);
     return $timest;
 }
开发者ID:vladimir-g,项目名称:rulinux-engine,代码行数:28,代码来源:object.class.php

示例3: VALUES

    $address = $_POST['address'];
    $notes = $_POST['notes'];
    $url = $_POST['url'];
    $fax = $_POST['fax'];
    $category_id = (int) $_POST['category_id'];
    $new_category = $_POST['new_category'];
    $public = (int) $_POST['public'];
    if (!$category_id) {
        $error .= '<li> Category cannot be left blank';
    }
    if (!$firstname && !$lastname && !$company) {
        $error .= '<li> First name / Last name / Company  cannot be left blank';
    }
    if (!$error) {
        if ($new_category) {
            $base_instance->query('INSERT INTO ' . $base_instance->entity['CONTACT']['CATEGORY'] . ' (title,user) VALUES ("' . sql_safe($new_category) . '",' . $userid . ')');
            $category_id = mysqli_insert_id($base_instance->db_link);
        }
        $firstname = str_replace('"', '&quot;', $firstname);
        $lastname = str_replace('"', '&quot;', $lastname);
        $address = str_replace('"', '&quot;', $address);
        $company = str_replace('"', '&quot;', $company);
        $base_instance->query('UPDATE ' . $base_instance->entity['CONTACT']['MAIN'] . ' SET firstname="' . sql_safe($firstname) . '",lastname="' . sql_safe($lastname) . '",email="' . sql_safe($email) . '",telephone="' . sql_safe($telephone) . '",fax="' . sql_safe($fax) . '",mobile="' . sql_safe($mobile) . '",address="' . sql_safe($address) . '",notes="' . sql_safe($notes) . '",company="' . sql_safe($company) . '",url="' . sql_safe($url) . '",category=' . $category_id . ',public=' . $public . ' WHERE user=' . $userid . ' AND ID=' . $contact_id);
        $data = $base_instance->get_data("SELECT title FROM {$base_instance->entity['CONTACT']['CATEGORY']} WHERE user='{$userid}' AND ID='{$category_id}'");
        $cat_title = $data[1]->title;
        $base_instance->show_message('Contact updated', '<script language="JavaScript" type="text/javascript">function createRequestObject(){try{var requester=new XMLHttpRequest();}catch(error){try{var requester=new ActiveXObject("Microsoft.XMLHTTP");}catch(error){return false;}} return requester;}var http=createRequestObject();function DelContact(item){if(confirm("Delete Contact?")){http.open(\'get\',\'delete-contact.php?item=\'+item); http.send(null);}}</script>

<a href="add-contact.php?category_id=' . $category_id . '">[Add more]</a> &nbsp;&nbsp; <a href="edit-contact.php?contact_id=' . $contact_id . '">[Edit]</a> &nbsp;&nbsp; <a href="javascript:DelContact(\'' . $contact_id . '\')">[Delete]</a> &nbsp;&nbsp; <a href="send-content.php?contact_id=' . $contact_id . '">[Send]</a><p><a href="show-contact-categories.php">[Show all Categories]</a> &nbsp; <a href="show-contact.php">[Show all Contacts]</a><p><b>Internal Link:</b> [c' . $contact_id . '] &nbsp;&nbsp; <b>Category:</b> ' . $cat_title . ' <a href="show-contact.php?category_id=' . $category_id . '">[Show]</a>');
    } else {
        $html_instance->error_message = $error;
        $company = stripslashes($company);
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-contact.php

示例4: base

<?php

require 'class.base.php';
require 'class.html.php';
$base_instance = new base();
$html_instance = new html();
$userid = $base_instance->get_userid();
$category_id = isset($_REQUEST['category_id']) ? (int) $_REQUEST['category_id'] : exit;
if (isset($_POST['delete_it'])) {
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['CATEGORY']} WHERE user='{$userid}' AND ID='{$category_id}'");
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['MAIN']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    # delete checkbox records
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['CHECKBOX_VALUES']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    $data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['DATABASE']['CHECKBOX_FIELDS']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    for ($index = 1; $index <= sizeof($data); $index++) {
        $checkbox_field_id = $data[$index]->ID;
        $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['CHECKBOX_ITEMS']} WHERE user='{$userid}' AND checkbox_field_id='{$checkbox_field_id}'");
    }
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['CHECKBOX_FIELDS']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    # delete select records
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['SELECT_VALUES']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    $data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['DATABASE']['SELECT_FIELDS']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    for ($index = 1; $index <= sizeof($data); $index++) {
        $select_field_id = $data[$index]->ID;
        $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['SELECT_ITEMS']} WHERE user='{$userid}' AND select_field_id='{$select_field_id}'");
    }
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['SELECT_FIELDS']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    # delete number records
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['NUMBER_FIELDS']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['NUMBER_VALUES']} WHERE user='{$userid}' AND category_id='{$category_id}'");
    header('Location: close-me.php');
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:delete-database-category.php

示例5: increase_loop_words

                                                } else {
                                                    echo 'error';
                                                    exit;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $base_instance->query("UPDATE {$base_instance->entity['KNOWLEDGE']['FLASHCARDS']} SET value={$new_value},shown=shown+1,last_shown={$now},word_loop=0 WHERE word_id='{$knowledge_id}' AND user='{$userid}' AND category_id=0");
    $base_instance->query("UPDATE {$base_instance->entity['KNOWLEDGE']['FLASHCARDS']} SET word_loop=1 WHERE word_loop=0 AND user={$userid} AND category_id=0 AND value > -1 AND value < {$now} ORDER BY value LIMIT 1");
    # find a new word from active words that is due and add to loop
    $aff_rows = mysqli_affected_rows($base_instance->db_link);
    if ($aff_rows == 0) {
        increase_loop_words(1);
    }
    # if nothing found add a new word to active words and add to loop
    echo '<head>', _CSS_NAV, '<meta http-equiv="refresh" content="10;url=status.php"></head><font size="2">Removed from Loop</font>';
}
#
function increase_loop_words($how_many)
{
    global $base_instance, $html_instance;
    $how_many--;
    $userid = $base_instance->user;
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:remove-from-loop.php

示例6: base

<?php

require 'class.base.php';
require 'class.html.php';
require 'class.home.php';
$base_instance = new base();
$html_instance = new html();
$home_instance = new home();
$userid = $base_instance->get_userid();
$home_id = isset($_REQUEST['home_id']) ? (int) $_REQUEST['home_id'] : '';
$base_instance->query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION'");
// necessary for the overflow problem, see http://dev.mysql.com/doc/refman/5.6/en/out-of-range-and-overflow.html
$all_text = '<div align="center">';
if ($userid == _GUEST_USERID) {
    $all_text .= '<h3>Demo Login, do not save any relevant data.</h3>Please read the <a href="help-intro.php"><u>help section</u></a> to get started with the Organizer';
} else {
    $all_text .= '<br>';
}
#
if (empty($home_id)) {
    $data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['HOME']['MAIN']} WHERE user='{$userid}' ORDER BY ID LIMIT 1");
} else {
    $data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['HOME']['MAIN']} WHERE ID='{$home_id}' AND user='{$userid}'");
}
if (isset($data)) {
    $title = $data[1]->title;
    $element1 = $data[1]->element1;
    $element2 = $data[1]->element2;
    $element3 = $data[1]->element3;
    $element4 = $data[1]->element4;
    $element5 = $data[1]->element5;
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:home.php

示例7: long

     }
     $new_category = str_replace('"', '&quot;', $new_category);
     if (strlen($new_category) > 50) {
         $error .= '<li> Category title is too long (Max. 50 Characters)';
     }
 }
 if ($title) {
     $title = trim($title);
     $title = str_replace('"', '&quot;', $title);
     if (strlen($title) > 100) {
         $error .= '<li> Title too long (Max. 100 Characters)';
     }
 }
 if (!$error) {
     if ($new_category) {
         $base_instance->query('INSERT INTO ' . $base_instance->entity['FILE']['CATEGORY'] . ' (title,user) VALUES ("' . sql_safe($new_category) . '",' . $userid . ')');
         $category_id = mysqli_insert_id($base_instance->db_link);
         $new_category = '';
     }
     $res = is_dir('./upload/' . $userid . '/');
     if (!$res) {
         system('mkdir ./upload/' . $userid . '/');
     }
     $uploadpath = './upload/' . $userid . '/';
     if ($source) {
         $imagesize = @getimagesize($source);
         switch ($imagesize[2]) {
             case 0:
                 $error .= '<li> Not an image file (only gif, jpg or png allowed)';
                 break;
             case 1:
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-file-by-url.php

示例8: isset

$category_id = isset($_REQUEST['category_id']) ? (int) $_REQUEST['category_id'] : exit;
if (isset($_POST['add_fields'])) {
    $number_of_fields = (int) $_POST['number_of_fields'];
    $number_of_fields += 3;
    for ($index = 1; $index <= $number_of_fields; $index++) {
        if (isset($_POST['name_select_field_item_' . $index])) {
            $item_value[$index] = sql_safe($_POST['name_select_field_item_' . $index]);
        } else {
            $item_value[$index] = '';
        }
    }
} else {
    if (isset($_POST['save_it'])) {
        $title_select_field = sql_safe($_POST['title_select_field']);
        $number_of_fields = (int) $_POST['number_of_fields'];
        $base_instance->query("INSERT INTO {$base_instance->entity['DATABASE']['SELECT_FIELDS']} (user,title,category_id) VALUES ({$userid},'{$title_select_field}',{$category_id})");
        $select_field_id = mysqli_insert_id($base_instance->db_link);
        for ($index = 1; $index <= $number_of_fields; $index++) {
            $name_item = sql_safe($_POST['name_select_field_item_' . $index]);
            if ($name_item) {
                $base_instance->query("INSERT INTO {$base_instance->entity['DATABASE']['SELECT_ITEMS']} (title,user,select_field_id) VALUES ('{$name_item}',{$userid},{$select_field_id})");
            }
        }
        $base_instance->show_message('Field saved', '<a href="add-database-number-field.php?category_id=' . $category_id . '">[Add Number Field]</a>&nbsp;&nbsp; <a href="add-database-text-field.php?category_id=' . $category_id . '">[Add Text Field]</a><p>
<a href="add-database-select-field.php?category_id=' . $category_id . '">[Add Select Field]</a> &nbsp;&nbsp; <a href="add-database-checkbox-field.php?category_id=' . $category_id . '">[Add Checkbox Field]</a><p><a href="add-database-data.php?category_id=' . $category_id . '">[Add Data]</a> &nbsp;&nbsp; <a href="edit-database-select-field.php?select_field_id=' . $select_field_id . '">[Edit Field]</a> &nbsp;&nbsp; <a href="show-database-data.php?category_id=' . $category_id . '">[Show all Data]</a>');
    }
}
if (empty($number_of_fields)) {
    $number_of_fields = 5;
}
if (isset($_POST['title_select_field'])) {
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-database-select-field.php

示例9: base

<?php

require 'class.base.php';
require 'class.html.php';
$base_instance = new base();
$html_instance = new html();
$userid = $base_instance->get_userid();
$id = isset($_GET['id']) ? (int) $_GET['id'] : exit;
$del_message = isset($_GET['del_message']) ? (int) $_GET['del_message'] : '';
if ($userid == _ADMIN_USERID && $del_message) {
    $base_instance->query("DELETE FROM {$base_instance->entity['FORUM']['MAIN']} WHERE ID={$del_message}");
}
$html_instance->add_parameter(array('ACTION' => 'show_content', 'ENTITY' => 'FORUM', 'WHERE' => "WHERE ID={$id} OR followup={$id}", 'ORDER_COL' => 'followup,datetime', 'ORDER_TYPE' => 'DESC', 'MAXHITS' => 40, 'TEXT_CENTER' => '<center><a href="javascript:history.go(-1)">[Go Back]</a></center>', 'INNER_TABLE_WIDTH' => '90%', 'HEADER' => 'Thread', 'URL_PARAMETER' => "id={$id}"));
$data = $html_instance->get_items();
$all_text = '';
for ($index = 1; $index <= sizeof($data); $index++) {
    $ID = $data[$index]->ID;
    $text = $data[$index]->text;
    $title = $data[$index]->title;
    $text = convert_square_bracket($text);
    $title = convert_square_bracket($title);
    if ($title) {
        $html_instance->para['HEADER'] = $title;
    }
    $userid_message = $data[$index]->user;
    $followup = $data[$index]->followup;
    $datetime = $data[$index]->datetime;
    $datetime_converted = $base_instance->convert_date($datetime);
    if ($followup == 0) {
        $color = '#dedfdf';
    } else {
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:show-forum-thread.php

示例10: trim

        $title = str_replace('"', '&quot;', $title);
    }
    if (!$diary_text) {
        $error .= '<li> Text cannot be left blank';
    } else {
        $diary_text = trim($diary_text);
        if (strlen($diary_text) > 65535) {
            $error .= '<li> Text is too long (Max. 65535 Characters)';
        }
    }
    if (!$error) {
        $date = $year . '-' . $month . '-' . $day;
        $data = $base_instance->get_data("SELECT ID FROM {$base_instance->entity['DIARY']['MAIN']} WHERE date='{$date}' AND user='{$userid}'");
        if (isset($data)) {
            $diary_id = $data[1]->ID;
            $base_instance->query('UPDATE ' . $base_instance->entity['DIARY']['MAIN'] . ' SET text="' . sql_safe($diary_text) . '",title="' . sql_safe($title) . '" WHERE user=' . $userid . ' AND ID=' . $diary_id);
        } else {
            $today = date('Y-m-d');
            $base_instance->query('INSERT INTO ' . $base_instance->entity['DIARY']['MAIN'] . ' (date,text,title,user,last_shown) VALUES ("' . sql_safe($date) . '","' . sql_safe($diary_text) . '","' . sql_safe($title) . '",' . $userid . ',"' . $today . '")');
            $diary_id = mysqli_insert_id($base_instance->db_link);
        }
        $base_instance->show_message('Diary saved', '<script language="JavaScript" type="text/javascript">function createRequestObject(){try{var requester=new XMLHttpRequest();}catch(error){try{var requester=new ActiveXObject("Microsoft.XMLHTTP");}catch(error){return false;}} return requester;}var http=createRequestObject();function DelDiary(item){if(confirm("Delete Diary?")){http.open(\'get\',\'delete-diary.php?item=\'+item); http.send(null);}}</script>

<a href="add-diary.php?day=' . $day . '&month=' . $month . '&year=' . $year . '">[Edit]</a> &nbsp;&nbsp; <a href="javascript:DelDiary(\'' . $diary_id . '\')">[Delete]</a> &nbsp;&nbsp; <a href="send-content.php?diary_id=' . $diary_id . '">[Send]</a> &nbsp;&nbsp; <a href="show-diary.php">[Show all]</a><p>');
    } else {
        $all_text = '<blockquote><font color="#ff0000"><ul>' . $error . '</ul></font></blockquote>';
        $diary_text = stripslashes($diary_text);
        $title = stripslashes($title);
    }
} elseif (isset($diary_id)) {
    $data = $base_instance->get_data("SELECT ID,date,text,title FROM {$base_instance->entity['DIARY']['MAIN']} WHERE ID='{$diary_id}' AND user='{$userid}'");
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-diary.php

示例11: mail

    You haven\'t logged in for almost a year. Your account
    might be deleted if you fail to do so. Please login
    as soon as possible. Your login details are:
    
    Login: '.$username.'
    Password: '.$password.'
    
    Login at '._HOMEPAGE.'/
    
    '._SEPARATOR."\n\n"; }*/
    $msg .= $newsletter_text;
    if ($all != 1) {
        $msg .= "\n\n" . _SEPARATOR . '

You receive this email because you signed up for our newsletter.

The URL of the website is ' . _HOMEPAGE . '/

To unsubscribe from this newsletter please go to
"Misc > Settings > Newsletter".';
    }
    $msg .= "\n\n";
    $msg .= _SEPARATOR . "\n";
    $msg .= _EMAIL_ADVERT_TEXT . "\n";
    $msg .= _SEPARATOR . "\n";
    $msg .= _SLOGAN . "\n";
    $msg .= _HOMEPAGE . "\n";
    $msg .= 'Email: ' . _ADMIN_EMAIL . "\n";
    mail($email, $mailsubject, $msg, $mailheaders);
    $base_instance->query("UPDATE {$base_instance->entity['USER']['MAIN']} SET newsletter={$newsletter_id} WHERE ID={$ID}");
}
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:send-newsletter.php

示例12: base

<?php

require 'class.base.php';
require 'class.html.php';
require 'class.user.php';
$base_instance = new base();
$html_instance = new html();
$user_instance = new user();
$user_instance->check_for_admin();
$news_id = isset($_REQUEST['news_id']) ? (int) $_REQUEST['news_id'] : exit;
if (isset($_POST['save'])) {
    $base_instance->query("DELETE FROM {$base_instance->entity['NEWS']['MAIN']} WHERE ID='{$news_id}'");
    header('Location: close-me.php');
    exit;
}
$data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['NEWS']['MAIN']} WHERE ID='{$news_id}'");
if (!$data) {
    $base_instance->show_message('News not found');
    exit;
}
$datetime = $data[1]->datetime;
$text = $data[1]->text;
$title = $data[1]->title;
$text2 = substr($text, 0, 50);
$datetime_converted = $base_instance->convert_date($datetime . ' 00:00:00');
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => '<font color="#ff0000">Delete this News?</font>', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BUTTON_TEXT' => 'Delete News'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'news_id', 'VALUE' => "{$news_id}"));
if ($title) {
    $text2 = "<b>{$title}</b>: {$text2}";
}
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => "<strong>Added:</strong> {$datetime_converted}<p>{$text2}"));
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:delete-news.php

示例13: setcookie

     $color_navigation = 1;
     $background = 14;
     $allow_file_upload = 2;
 } else {
     $font_face_main = $data[1]->font_face_main;
     $font_face_navigation = $data[1]->font_face_navigation;
     $font_size = $data[1]->font_size;
     $color_main = $data[1]->color_main;
     $color_navigation = $data[1]->color_navigation;
     $background = $data[1]->background;
     $allow_file_upload = $data[1]->allow_file_upload;
     setcookie('remember_username', $username, time() + 2592000);
 }
 $datetime = date('Y-m-d H:i:s');
 # set new login number and logins
 $base_instance->query("UPDATE {$base_instance->entity['USER']['MAIN']} SET logins=logins+1,lastlogin='{$datetime}' WHERE ID={$userid}");
 $sid = mt_rand(1000000, 9999999);
 $timestamp = time();
 # delete old session id of same user
 $base_instance->query("DELETE FROM {$base_instance->entity['SESSION']['MAIN']} WHERE user={$userid}");
 # new session id
 $base_instance->query("INSERT INTO {$base_instance->entity['SESSION']['MAIN']} (session_id, create_time, last_active, user, lastlogin, background, color_main, color_navigation, font_face_main, font_face_navigation, font_size, timezone, dateformat, online_status, allow_file_upload) VALUES ({$sid}, {$timestamp}, {$timestamp}, {$userid}, '{$lastlogin}', {$background}, {$color_main}, {$color_navigation}, {$font_face_main}, {$font_face_navigation}, {$font_size}, {$timezone}, {$dateformat}, {$online_status}, {$allow_file_upload})");
 if (substr($lastlogin, 0, 10) != substr($datetime, 0, 10)) {
     # do this just once a day, not for every login
     $base_instance->query("UPDATE {$base_instance->entity['LINK']['MAIN']} SET popularity=popularity*0.995 WHERE user='{$userid}'");
 }
 setcookie('sid', $sid);
 if (($logins == 10 or $logins == 200 or $logins == 1000 or $logins == 1500 or $logins == 2000) && empty($_GET['guest']) && $userid != _ADMIN_USERID && _ASK_FEEDBACK == 1) {
     header('Location: feedback.php');
     exit;
 } else {
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:auth.php

示例14: mail

You can directly login with the following URL:

' . $url . '

For the password reminder go here:

' . _HOMEPAGE . '/password-reminder.php';
        $msg .= "\n\n";
        $msg .= _SEPARATOR . "\n";
        $msg .= _EMAIL_ADVERT_TEXT . "\n";
        $msg .= _SEPARATOR . "\n";
        $msg .= _SLOGAN . "\n";
        $msg .= _HOMEPAGE . "\n";
        $msg .= 'Email: ' . _ADMIN_EMAIL . "\n";
        mail($email, $mailsubject, $msg, $mailheaders);
        $base_instance->query("UPDATE {$base_instance->entity['USER']['MAIN']} SET last_reminded='{$today}' WHERE ID={$ID}");
    }
    if ($sizeof > 0) {
        echo '<head><meta http-equiv="refresh" content="10;URL=send-warning.php?months=' . $months . '&save=1"></head><p><strong>Continue to send more reminder emails in a few seconds (' . $fnd_rows . ' left) ..</strong>';
    } else {
        echo 'finished';
    }
    exit;
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Send Reminder', 'TEXT_CENTER' => 'Send a reminder email to user who have not logged in for a long time.<p>', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BUTTON_TEXT' => 'Send', 'INNER_TABLE_WIDTH' => '220'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => '<strong>Send Email to users who have .. </strong>'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => '<select name="months">
<option value=3>Not logged in for 3 months
<option selected value=6>Not logged in for 6 months
<option value=12>Not logged in for 1 year
<option value=24>Not logged in for 2 years
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:send-warning.php

示例15: trim

    } else {
        if (!$followup) {
            $error .= '<li> Title cannot be left blank';
        }
    }
    if ($text) {
        $text = trim($text);
        if (strlen($text) > 65535) {
            $error .= '<li> Text is too long (Max. 65535 Characters)';
        }
    } else {
        $error .= '<li> Message cannot be left blank';
    }
    if (!$error) {
        $datetime = $_POST['datetime'];
        $base_instance->query('INSERT INTO ' . $base_instance->entity['FORUM']['MAIN'] . ' (datetime,updated,text,title,followup,user) VALUES ("' . sql_safe($datetime) . '","' . sql_safe($datetime) . '","' . sql_safe($text) . '","' . sql_safe($title) . '",' . $followup . ',' . $userid . ')');
        if (_FORUM_NOTIFY == 1 && $userid != _ADMIN_USERID) {
            $msg = "New Forum Message:\n\n" . $title . "\n\n" . $text;
            $base_instance->send_email_from_admin('New Forum Message Notification', $msg, _ADMIN_EMAIL);
        }
        header('Location: show-forum.php');
        exit;
    } else {
        $html_instance->error_message = $error;
        $text = stripslashes($text);
        $title = stripslashes($title);
    }
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'New Forum Message', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BODY' => 'onLoad="javascript:document.form1.title.focus()"', 'BUTTON_TEXT' => 'Post new Message'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'followup', 'VALUE' => "{$followup}"));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => "{$title}", 'SIZE' => 50, 'TEXT' => 'Title'));
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-forum-message.php


注:本文中的base::query方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。