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


PHP insert_log函数代码示例

本文整理汇总了PHP中insert_log函数的典型用法代码示例。如果您正苦于以下问题:PHP insert_log函数的具体用法?PHP insert_log怎么用?PHP insert_log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: set_status

function set_status($data)
{
    $file = device_put_content . 'status.txt';
    file_put_contents($file, $data);
    if ($data == '<0>') {
        insert_log('Device Disarmed');
    } else {
        insert_log('Device Armed');
    }
}
开发者ID:AlvaCorp,项目名称:sistem-kendali-pintu,代码行数:10,代码来源:hw_function.php

示例2: set_time_limit

set_time_limit(0);
// 定义应用目录
define('APP', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
// 载入框架引导文件
require APP . 'system/_shell.php';
require APP . 'funcs/spider.fn.php';
require APP . 'models/TaskModel.php';
require APP . 'et/phpQuery/phpQuery.php';
//获取链接列表  http://www.tomdurrie.com/search.php?page=380
$links = get_batch_link('http://www.tomdurrie.com/search.php?page=(*)', 1, 6, 1);
if (!empty($links)) {
    foreach ($links as $target_url) {
        /**
         * 获取维美达链接列表
         */
        echo "正在获取链接{$target_url}下的产品链接\n";
        phpQuery::newDocumentFile($target_url);
        $goods_list = pq('.hoverlist');
        $lists_tmp = array();
        foreach ($goods_list as $li) {
            $lists_tmp[] = array('url' => pq($li)->find('a')->attr('href'), 'thumb_img_org' => pq($li)->find('img')->attr('src'));
        }
        // 探测链接失败
        if (empty($lists_tmp)) {
            system("echo -e '探测链接列表失败: \\033[31m" . $target_url . "\\033[0m'");
            $result_errr = insert_log($target_url, '探测链接列表失败');
        } else {
            insert_ec_urls($lists_tmp, 0, true, 'spider_ecshop_url');
        }
    }
}
开发者ID:boxcore,项目名称:xspider,代码行数:31,代码来源:get-ecshop-links.shell.php

示例3: Dao

<?php

require_once 'logic.php';
$query_string = $_SERVER["QUERY_STRING"];
$error_message = "";
$dao = new Dao($db_conf['host'], $db_conf['port'], $db_conf['user'], $db_conf['passwd'], $db_conf['db_name']);
$op_type = -1;
$para = array();
$ret = insert_log($dao, $query_string, INFOBIP, $op_type, $para, $error_message);
if ($ret != 0) {
    live_log(ERROR, $ret, $error_message);
    interface_log(ERROR, $ret, "response:" . $query_string . "err_msg: " . $error_message);
    http_response_code(400);
    echo 202;
    return;
}
$mo_data = array();
$mo_data['mobile_num'] = $para['phone'];
$mo_data['content'] = $para['message'];
$mo_data['link_id'] = $para['transactionid'];
$mo_data['parter_symbol'] = INFOBIP;
$mo_data['mo_addr'] = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
$mo_data['submit_flag'] = 0;
$mo_data['sp_code'] = intval($para['shortcode']);
$mo_data['mo_time'] = date('Y-m-d H:i:s');
$mo_data['transmit_flag'] = Dao::TRANSMIT_FLAG_INITAL;
$linkid = $mo_data['link_id'];
$id = 0;
$ret = write_original_data($dao, $mo_data, true, $id, $error_message);
if ($ret != 0) {
    live_log(ERROR, $ret, $error_message);
开发者ID:youngky2008,项目名称:sp_cp,代码行数:31,代码来源:infobip_mo.php

示例4: substr

<?php

include_once '/../includes/user_function.php';
include_once '/../includes/hw_function.php';
$string = $_POST['password'];
$userid = substr($string, 0, 3);
$password = substr($string, 3);
$result = get_single_user($userid);
if (!empty($result)) {
    if ($result->password == $password) {
        $data = '<1>';
        set_result($data);
        insert_log($result->name);
    } else {
        $data = '<0>';
        set_result($data);
    }
} else {
    $data = '<0>';
    set_result($data);
}
开发者ID:AlvaCorp,项目名称:sistem-kendali-pintu,代码行数:21,代码来源:get_password.php

示例5: add_comment

 /**
  * Function used to add comment 
  */
 function add_comment($comment, $obj_id, $reply_to = NULL, $force_name_email = false)
 {
     global $myquery, $db;
     $collection = $this->get_collection($obj_id);
     if (!$collection) {
         e(lang("collect_not_exist"));
     } else {
         $obj_owner = $this->get_collection_field($collection, "userid");
         $cl_link = $this->collection_links($collection, 'vc');
         $comment = $myquery->add_comment($comment, $obj_id, $reply_to, 'cl', $obj_owner, $cl_link, $force_name_email);
         //echo $comment;
         if ($comment) {
             $log_array = array('success' => 'yes', 'details' => "comment on a collection", 'action_obj_id' => $obj_id, 'action_done_id' => $comment);
             insert_log('collection_comment', $log_array);
             $this->update_total_comments($obj_id);
         }
         return $comment;
     }
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:22,代码来源:collections.class.php

示例6: add_comment

 /**
  * Function used to add video comment
  */
 function add_comment($comment, $obj_id, $reply_to = NULL, $force_name_email = false)
 {
     global $myquery, $db;
     $video = $this->get_video_details($obj_id);
     if (!$video) {
         e(lang("class_vdo_del_err"));
     } else {
         //Getting Owner Id
         $owner_id = $this->get_video_owner($obj_id, true);
         $add_comment = $myquery->add_comment($comment, $obj_id, $reply_to, 'v', $owner_id, videoLink($video), $force_name_email);
         if ($add_comment) {
             //Loggin Comment
             $log_array = array('success' => 'yes', 'details' => "comment on a video", 'action_obj_id' => $obj_id, 'action_done_id' => $add_comment);
             insert_log('video_comment', $log_array);
             //Updating Number of comments of video
             $this->update_comments_count($obj_id);
         }
         return $add_comment;
     }
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:23,代码来源:video.class.php

示例7: session_start

<?php

session_start();
include 'config.php';
include 'db_functions.php';
$userid = $_SESSION['user_id'];
extract($_GET);
if ($id != "") {
    $fes_name = get_cell('fes', $id, 'fes_name');
    mysql_query("DELETE FROM `fes` WHERE  `id` = '{$id}'");
    //Event 6 = Deleted
    $affected_id = $id;
    $description = "Fes " . $fes_name . " Deleted";
    insert_log($userid, 6, 'fes', $affected_id, $description);
}
?>
<script>
window.top.window.manage_fes();
</script>
开发者ID:clusterwebsolutions,项目名称:airtel_agent,代码行数:19,代码来源:delete_fes.php

示例8: add_comment

 /**
  * Function used to add video comment
  */
 function add_comment($comment, $obj_id, $reply_to = NULL)
 {
     global $myquery, $db;
     if (!$this->topic_exists($obj_id)) {
         e(lang("grp_tpc_err4"));
     } else {
         $owner = $this->get_group_owner_from_topic($obj_id);
         $add_comment = $myquery->add_comment($comment, $obj_id, $reply_to, 't', $owner);
         if ($add_comment) {
             //Loggin Comment
             $log_array = array('success' => 'yes', 'details' => "comment on a topic", 'action_obj_id' => $obj_id, 'action_done_id' => $add_comment);
             insert_log('topic_comment', $log_array);
             //Updating Number of comments of topics
             $this->update_comments_count($obj_id);
         }
         return $add_comment;
     }
 }
开发者ID:Coding110,项目名称:cbvideo,代码行数:21,代码来源:groups.class.php

示例9: add_comment

 /**
  * Function used to add comment
  * This is more advance function , 
  * in this function functions can be applied on comments
  */
 function add_comment($comment, $obj_id, $reply_to = NULL, $type = 'v', $obj_owner = NULL, $obj_link = NULL, $force_name_email = false)
 {
     global $userquery, $eh, $db, $Cbucket;
     //Checking maximum comments characters allowed
     if (defined("MAX_COMMENT_CHR")) {
         if (strlen($comment) > MAX_COMMENT_CHR) {
             e(sprintf("'%d' characters allowed for comment", MAX_COMMENT_CHR));
         }
     }
     if (!verify_captcha()) {
         e(lang('usr_ccode_err'));
     }
     if (empty($comment)) {
         e(lang("pelase_enter_something_for_comment"));
     }
     $params = array('comment' => $comment, 'obj_id' => $obj_id, 'reply_to' => $reply_to, 'type' => $type);
     $this->validate_comment_functions($params);
     /* 		
      if($type=='video' || $type=='v')
      {
      if(!$this->video_exists($obj_id))
      e(lang("class_vdo_del_err"));
     
      //Checking owner of video
      if(!USER_COMMENT_OWN)
      {
      if(userid()==$this->get_vid_owner($obj_id));
      e(lang("usr_cmt_err2"));
      }
      }
     */
     if (!userid() && $Cbucket->configs['anonym_comments'] != 'yes') {
         e(lang("you_not_logged_in"));
     }
     if (!userid() && $Cbucket->configs['anonym_comments'] == 'yes' || $force_name_email) {
         //Checking for input name and email
         if (empty($_POST['name'])) {
             e(lang("please_enter_your_name"));
         }
         if (empty($_POST['email'])) {
             e(lang("please_enter_your_email"));
         }
         $name = mysql_clean($_POST['name']);
         $email = mysql_clean($_POST['email']);
     }
     if (empty($eh->error_list)) {
         $attributes = get_message_attributes($comment);
         if (is_array($attributes)) {
             $attributes = json_encode($attributes);
         }
         $fields = array('type' => $type, 'comment' => $comment, 'comment_attributes' => $attributes, 'type_id' => $obj_id, 'userid' => userid(), 'date_added' => now(), 'parent_id' => $reply_to, 'anonym_name' => $name, 'anonym_email' => $email, 'comment_ip' => mysql_clean(client_ip()), 'type_owner_id' => $obj_owner);
         $cid = db_insert(tbl('comments'), $fields);
         $db->update(tbl("users"), array("total_comments"), array("|f|total_comments+1"), " userid='" . userid() . "'");
         e(lang("grp_comment_msg"), "m");
         //$cid = $db->insert_id();
         $own_details = $userquery->get_user_field_only($obj_owner, 'email');
         $username = username();
         $username = $username ? $username : post('name');
         $useremail = $email;
         //Adding Comment Log
         $log_array = array('success' => 'yes', 'action_obj_id' => $cid, 'action_done_id' => $obj_id, 'details' => "made a comment", 'username' => $username, 'useremail' => $useremail);
         insert_log($type . '_comment', $log_array);
         //sending email
         if (SEND_COMMENT_NOTIFICATION == 'yes' && $own_details) {
             global $cbemail;
             $tpl = $cbemail->get_template('user_comment_email');
             $more_var = array('{username}' => $username, '{obj_link}' => $obj_link . '#comment_' . $cid, '{comment}' => $comment, '{obj}' => get_obj_type($type));
             if (!is_array($var)) {
                 $var = array();
             }
             $var = array_merge($more_var, $var);
             $subj = $cbemail->replace($tpl['email_template_subject'], $var);
             $msg = nl2br($cbemail->replace($tpl['email_template'], $var));
             //Now Finally Sending Email
             cbmail(array('to' => $own_details, 'from' => WEBSITE_EMAIL, 'subject' => $subj, 'content' => $msg));
         }
         add_users_mentioned($comment, NULL, $cid);
         return $cid;
     }
     return false;
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:86,代码来源:my_queries.class.php

示例10: login

function login($username, $password, $key, $post)
{
    global $empire, $public_r, $dbtbpre, $do_loginauth, $do_ckhloginfile;
    $username = RepPostVar($username);
    $password = RepPostVar($password);
    if (!$username || !$password) {
        printerror("EmptyKey", "index.php");
    }
    //验证码
    $keyvname = 'checkkey';
    if (!$public_r['adminloginkey']) {
        ecmsCheckShowKey($keyvname, $key, 0, 0);
    }
    if (strlen($username) > 30 || strlen($password) > 30) {
        printerror("EmptyKey", "index.php");
    }
    $loginip = egetip();
    $logintime = time();
    CheckLoginNum($loginip, $logintime);
    //认证码
    if ($do_loginauth && $do_loginauth != $post['loginauth']) {
        InsertErrorLoginNum($username, $password, 1, $loginip, $logintime);
        printerror("ErrorLoginAuth", "index.php");
    }
    $user_r = $empire->fetch1("select userid,password,salt,lasttime,lastip from {$dbtbpre}enewsuser where username='" . $username . "' and checked=0 limit 1");
    if (!$user_r['userid']) {
        InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
        printerror("LoginFail", "index.php");
    }
    $ch_password = md5(md5($password) . $user_r['salt']);
    if ($user_r['password'] != $ch_password) {
        InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
        printerror("LoginFail", "index.php");
    }
    //安全问答
    $user_addr = $empire->fetch1("select userid,equestion,eanswer from {$dbtbpre}enewsuseradd where userid='{$user_r['userid']}'");
    if (!$user_addr['userid']) {
        InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
        printerror("LoginFail", "index.php");
    }
    if ($user_addr['equestion']) {
        $equestion = (int) $post['equestion'];
        $eanswer = $post['eanswer'];
        if ($user_addr['equestion'] != $equestion) {
            InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
            printerror("LoginFail", "index.php");
        }
        $ckeanswer = ReturnHLoginQuestionStr($user_r['userid'], $username, $user_addr['equestion'], $eanswer);
        if ($ckeanswer != $user_addr['eanswer']) {
            InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
            printerror("LoginFail", "index.php");
        }
    }
    //取得随机密码
    $rnd = make_password(20);
    $sql = $empire->query("update {$dbtbpre}enewsuser set rnd='{$rnd}',loginnum=loginnum+1,lastip='{$loginip}',lasttime='{$logintime}',pretime='{$user_r['lasttime']}',preip='" . RepPostVar($user_r[lastip]) . "' where username='{$username}' limit 1");
    $r = $empire->fetch1("select groupid,userid,styleid from {$dbtbpre}enewsuser where username='{$username}' limit 1");
    //样式
    if (empty($r[styleid])) {
        $stylepath = $public_r['defadminstyle'] ? $public_r['defadminstyle'] : 1;
    } else {
        $styler = $empire->fetch1("select path,styleid from {$dbtbpre}enewsadminstyle where styleid='{$r['styleid']}'");
        if (empty($styler[styleid])) {
            $stylepath = $public_r['defadminstyle'] ? $public_r['defadminstyle'] : 1;
        } else {
            $stylepath = $styler['path'];
        }
    }
    //设置备份
    $cdbdata = 0;
    $bnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsgroup where groupid='{$r['groupid']}' and dodbdata=1");
    if ($bnum) {
        $cdbdata = 1;
        $set5 = esetcookie("ecmsdodbdata", "empirecms", 0, 1);
    } else {
        $set5 = esetcookie("ecmsdodbdata", "", 0, 1);
    }
    ecmsEmptyShowKey($keyvname, 0);
    //清空验证码
    $set4 = esetcookie("loginuserid", $r[userid], 0, 1);
    $set1 = esetcookie("loginusername", $username, 0, 1);
    $set2 = esetcookie("loginrnd", $rnd, 0, 1);
    $set3 = esetcookie("loginlevel", $r[groupid], 0, 1);
    $set5 = esetcookie("eloginlic", "empirecmslic", 0, 1);
    $set6 = esetcookie("loginadminstyleid", $stylepath, 0, 1);
    //COOKIE加密验证
    if (empty($do_ckhloginfile)) {
        DoEDelFileRnd($r[userid]);
    }
    DoECookieRnd($r[userid], $username, $rnd, $cdbdata, $r[groupid], intval($stylepath), $logintime);
    //最后登陆时间
    $set4 = esetcookie("logintime", $logintime, 0, 1);
    $set5 = esetcookie("truelogintime", $logintime, 0, 1);
    //写入日志
    insert_log($username, '', 1, $loginip, 0);
    //FireWall
    FWSetPassword();
    if ($set1 && $set2 && $set3) {
        //操作日志
        insert_dolog("");
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:adminfun.php

示例11: get_total_row

            $trow = get_total_row('manual_base', 'account_number', $account_number);
            if ($trow > 0) {
                $update_sql = "UPDATE `manual_base` SET `ivr_flag`='{$ivr_flag}' where `account_number`='{$account_number}'";
                mysql_query($update_sql);
            } else {
                $append_values .= "('{$code}','{$account_number}','{$external_id}','{$account_category}','{$full_name}','{$address}','{$mailzip}','{$billplan}','{$billcycle}','{$fe}','{$cur_file_name}','{$dv}','{$ivr_flag}','{$batch_code}'),";
            }
        }
    }
}
//Remvoing Last comma in appended String
$sql = substr($insert_sql . $append_values, 0, -1);
mysql_query($sql);
$trow = mysql_num_rows(mysql_query("select * from manual_base where 1"));
$description = "Total row in Excel:" . $trow_in_excel . "Total Row in temprory Base : " . $trow;
insert_log($userid, 10, 'manual_base', 0, $description);
function array_push_assoc($array, $key, $value)
{
    $array[$key] = $value;
    return $array;
}
?>
 
<script>
<?php 
if ($error_flag == 1) {
    ?>
alert("<?php 
    echo $error_message;
    ?>
");
开发者ID:clusterwebsolutions,项目名称:airtel_agent,代码行数:31,代码来源:upload_excel.php

示例12: signup_user


//.........这里部分代码省略.........
         }
         if (has_access('admin_access', true)) {
             if ($array['status'] == 'verified') {
                 $status = 'verified';
                 $welcome_email = 'yes';
             } else {
                 $status = 'unverified';
                 $welcome_email = 'no';
             }
             if ($array['active'] == 'yes') {
                 $active = 'yes';
             } else {
                 $active = 'yes';
             }
             $query_field[] = "level";
             $query_val[] = $array['level'];
         }
         $query_field[] = "status";
         $query_val[] = $status;
         $query_field[] = "active";
         $query_val[] = $active;
         $query_field[] = "\twelcome_email_sent";
         $query_val[] = $welcome_email;
         //Creating AV Code
         $avcode = RandomString(10);
         $query_field[] = "avcode";
         $query_val[] = $avcode;
         //Signup IP
         $signup_ip = $_SERVER['REMOTE_ADDR'];
         $query_field[] = "signup_ip";
         $query_val[] = $signup_ip;
         //Date Joined
         $now = NOW();
         $query_field[] = "doj";
         $query_val[] = $now;
         /**
          * A VERY IMPORTANT PART OF
          * OUR SIGNUP SYSTEM IS
          * SESSION KEY AND CODE
          * WHEN A USER IS LOGGED IN
          * IT IS ONLY VALIDATED BY
          * ITS SIGNUP KEY AND CODE 
          *
          */
         $sess_key = $this->create_session_key($_COOKIE['PHPSESSID'], $array['password']);
         $sess_code = $this->create_session_code();
         $query_field[] = "user_session_key";
         $query_val[] = $sess_key;
         $query_field[] = "user_session_code";
         $query_val[] = $sess_code;
         $query = "INSERT INTO " . tbl("users") . " (";
         $total_fields = count($query_field);
         //Adding Fields to query
         $i = 0;
         foreach ($query_field as $qfield) {
             $i++;
             $query .= $qfield;
             if ($i < $total_fields) {
                 $query .= ',';
             }
         }
         $query .= ") VALUES (";
         $i = 0;
         //Adding Fields Values to query
         foreach ($query_val as $qval) {
             $i++;
             $query .= "'{$qval}'";
             if ($i < $total_fields) {
                 $query .= ',';
             }
         }
         //Finalzing Query
         $query .= ")";
         $db->Execute($query);
         $insert_id = $db->insert_id();
         $db->insert(tbl($userquery->dbtbl['user_profile']), array("userid"), array($insert_id));
         if (!has_access('admin_access', true) && EMAIL_VERIFICATION && $send_signup_email) {
             global $cbemail;
             $tpl = $cbemail->get_template('email_verify_template');
             $more_var = array('{username}' => post('username'), '{password}' => post('password'), '{email}' => post('email'), '{avcode}' => $avcode);
             if (!is_array($var)) {
                 $var = array();
             }
             $var = array_merge($more_var, $var);
             $subj = $cbemail->replace($tpl['email_template_subject'], $var);
             $msg = nl2br($cbemail->replace($tpl['email_template'], $var));
             //Now Finally Sending Email
             //cbmail(array('to'=>post('email'),'from'=>WEBSITE_EMAIL,'subject'=>$subj,'content'=>$msg));
         } elseif (!has_access('admin_access', true) && $send_signup_email) {
             //$this->send_welcome_email($insert_id);
         }
         $log_array = array('username' => $array['username'], 'userid' => $insert_id, 'userlevel' => $array['level'], 'useremail' => $array['email'], 'success' => 'yes', 'details' => sprintf("%s signed up", $array['username']));
         //Login Signup
         insert_log('signup', $log_array);
         //Adding User has Signup Feed
         addFeed(array('action' => 'signup', 'object_id' => $insert_id, 'object' => 'signup', 'uid' => $insert_id));
         return $insert_id;
     }
     return false;
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:101,代码来源:user.class.php

示例13: submit_upload


//.........这里部分代码省略.........
                 $new_val = '';
                 foreach ($val as $v) {
                     $new_val .= "#" . $v . "# ";
                 }
                 $val = $new_val;
             }
             if (!$field['clean_func'] || !apply_func($field['clean_func'], $val) && !is_array($field['clean_func'])) {
                 $val = mysql_clean($val);
             } else {
                 $val = apply_func($field['clean_func'], sql_free($val));
             }
             if (empty($val) && !empty($field['default_value'])) {
                 $val = $field['default_value'];
             }
             if (!empty($field['db_field'])) {
                 $query_val[] = $val;
             }
         }
         //Adding Video Code
         $query_field[] = "file_name";
         $file_name = mysql_clean($array['file_name']);
         $query_val[] = $file_name;
         //ADding Video Key
         $query_field[] = "videokey";
         $query_val[] = $this->video_keygen();
         //Userid
         $query_field[] = "userid";
         if (!$array['userid']) {
             $query_val[] = $userid;
         } else {
             $query_val[] = $array['userid'];
         }
         //Upload Ip
         $query_field[] = "uploader_ip";
         $query_val[] = $_SERVER['REMOTE_ADDR'];
         $activation = ACTIVATION;
         //Setting Activation Option
         if ($activation == 0) {
             $active = 'yes';
         } else {
             $active = 'no';
         }
         $query_field[] = "active";
         $query_val[] = $active;
         $query_field[] = "date_added";
         $query_val[] = now();
         $query_field[] = 'file_directory';
         $query_val[] = $array['file_directory'];
         /*$query = "INSERT INTO " . tbl("video") . " (";
                     $total_fields = count($query_field);
         
                     //Adding Fields to query
                     $i = 0;
                     foreach ($query_field as $qfield) {
                         $i++;
                         $query .= $qfield;
                         if ($i < $total_fields)
                             $query .= ',';
                     }
         
                     $query .= ") VALUES (";
         
         
                     $i = 0;
                     //Adding Fields Values to query
                     foreach ($query_val as $qval) {
                         $i++;
                         $query .= "'$qval'";
                         if ($i < $total_fields)
                             $query .= ',';
                     }
         
                     //Finalzing Query
                     $query .= ")";
                     */
         $the_fields = array();
         $total_fields = count($query_field);
         for ($i = 0; $i < $total_fields; $i++) {
             $the_fields[$query_field[$i]] = $query_val[$i];
         }
         //exit($query);
         if (!userid() && !has_access('allow_video_upload', false, false)) {
             e(lang("you_not_logged_in"));
             //exit();
         } else {
             $insert_id = file_name_exists($file_name);
             if (!$insert_id) {
                 //$db->Execute($query);
                 $insert_id = db_insert(tbl('video'), $the_fields);
                 //loggin Upload
                 $log_array = array('success' => 'yes', 'action_obj_id' => $insert_id, 'userid' => $userid, 'details' => "uploaded a video");
                 insert_log('upload_video', $log_array);
                 $db->update(tbl("users"), array("total_videos"), array("|f|total_videos+1"), " userid='" . $userid . "'");
             }
         }
     }
     //Adding Video Feed
     //addFeed(array('action' => 'upload_video', 'object_id' => $insert_id, 'object' => 'video'));
     return $insert_id;
 }
开发者ID:karamasmouh,项目名称:clipbucket,代码行数:101,代码来源:upload.class.php

示例14: feedback

feedback("Attendance Portal - Feedback");
if (isset($_POST['post'])) {
    include 'config/db.php';
    include 'config/settings.php';
    $dbname = $branchyear . '_Logs';
    $table = $branchyear . '_Feedback';
    $ftype = $_POST['ftype'];
    $Sentby = $_SESSION['UserId'];
    $sub = trim(htmlentities(addslashes($_POST['sub'])));
    //$feedback = trim(htmlentities(addslashes($_POST['fb'])));
    //$feedback = trim(htmlentities(addslashes(str_replace("\n","<br>",$_POST['fb']))));
    $feedback = trim(str_replace("\n", "<br>", $_POST['fb']));
    if (strlen($sub) < 6) {
        echo "<script>show_error('Subject Length Must Be Lessthan or equals to 6');</script>";
        exit;
    }
    if (strlen($feedback) < 10) {
        echo "<script>show_error('Feedback Length Must Be Lessthan or equals to 10');</script>";
        exit;
    }
    $datetime = date('d/m/Y H:i:s');
    $ip = $_SERVER['REMOTE_ADDR'];
    //if(!mysql_select_db($dbname)) die(mysql_error());
    $query = "INSERT INTO " . $table . "(`Ftype`,`Subject`,`Feedback`,`Sentby`,`DateTime`,`IP`) VALUES('{$ftype}','{$sub}','{$feedback}','{$Sentby}','{$datetime}','{$ip}');";
    if (mysql_query($query)) {
        echo "<script>show_success('Your Feedback posted successfully..Thank you');</script>";
        insert_log($_SESSION['UserId'] . " sent feedback");
    } else {
        die(mysql_error());
    }
}
开发者ID:0xc0d3r,项目名称:Attendance-Portal,代码行数:31,代码来源:feedback.php

示例15: create_playlist

 /**
  * Function used to create new playlist
  * @param ARRAY
  */
 function create_playlist($params)
 {
     global $db;
     //Similar to extract but adding mysql_clean
     $newarray = array_map('mysql_clean', $params);
     extract($newarray);
     if (!$category) {
         $category = 'normal';
     }
     if ($log_messages != 'no') {
         $log_messages = 'yes';
     }
     if (!userid()) {
         e(lang("please_login_create_playlist"), "e");
     } elseif (empty($name)) {
         e(lang("please_enter_playlist_name"), "e", "playlist_name");
     } elseif ($this->playlist_exists($name, userid(), $this->type, $category)) {
         e(sprintf(lang("play_list_with_this_name_arlready_exists"), $name), "e", "playlist_name");
     } else {
         $fields = array('playlist_name', 'userid', 'description', 'tags', 'playlist_type', 'privacy', 'allow_comments', 'allow_rating', 'date_added', 'category');
         $values = array($name, userid(), $description, $tags, $this->type, $privacy, $allow_comments, $allow_rating, now(), $category);
         $db->insert(tbl($this->playlist_tbl), $fields, $values);
         if ($log_messages == 'yes') {
             e(lang("new_playlist_created"), "m");
         }
         $pid = $db->insert_id();
         //Logging Playlist
         $log_array = array('success' => 'yes', 'details' => "created playlist", 'action_obj_id' => $pid);
         insert_log('add_playlist', $log_array);
         return $pid;
     }
     return false;
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:37,代码来源:actions.class.php


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