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


PHP doLog函数代码示例

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


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

示例1: userSettingSubmit

 public function userSettingSubmit()
 {
     if (!isset($_SESSION['userId'])) {
         $this->error(C('LOGIN_FIRST'));
     }
     $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
     $this->assign('USER_ID', $_SESSION['userId']);
     $this->assign('USER_LEVEL', $_SESSION['userLevel']);
     $this->assign('CURRENT_MENU', 'USER');
     $data['userId'] = $_GET['userid'];
     $exUserPassword = $_POST['exUserPassword'];
     $data['userMail'] = $_POST['userMail'];
     $user = M('user');
     $tempUser = $user->where('userid=' . $_GET['userid'])->limit(1)->select();
     if ($_POST['newUserPassword'] != null) {
         //输入了密码,需要修改密码
         if (strcmp($tempUser[0]['userpassword'], $exUserPassword) == 0) {
             //密码相同,可以修改
             $data['userPassword'] = $_POST['newUserPassword'];
         } else {
             $this->error('输入的旧密码不正确');
             return;
         }
     } else {
         $this->error('输入有误!');
     }
     $result = $user->save($data);
     if ($result !== false) {
         doLog($_SESSION['userId'], 28, 'Edit_User_Setting_Submit');
         $this->success(C('EDIT_SUCCESS'));
     } else {
         $this->error(C('EDIT_FAIL'));
     }
     // $this->show();
 }
开发者ID:ai516001066,项目名称:ProjectAF,代码行数:35,代码来源:UserController.class.php

示例2: logout

 public function logout()
 {
     doLog(0, 10, 'Logout_account_:_' . $_SESSION['userAccount']);
     session('userAccount', null);
     session('userId', null);
     $this->success('退出成功', 'login');
 }
开发者ID:ai516001066,项目名称:LNZM,代码行数:7,代码来源:LoginController.class.php

示例3: mensaje

function mensaje($datos)
{
    $link = Conexion::singleton();
    /*			 $usuario="eureka";
    
                      $clave="eureka";
    
                      $db_host="localhost";
    
                      $bd_nombre="eureka";
    
                      $port = 5432;
    
    
    
                     $link = new PDO('pgsql: host='.$db_host.'; dbname='.$bd_nombre.'; port='.$port, $usuario, $clave);
    
    
    
                    //var_dump($link);
    
    
    
                    */
    $firstname = $datos['contacto']['nombre'];
    $surname = $datos['contacto']['apellido'];
    $tlf = $datos['contacto']['tlf'];
    $emailaddress = $datos['contacto']['correo'];
    $mensaje = $datos['contacto']['mensaje'];
    $query = "INSERT INTO mensajes(nombre, apellido, telefono, correo, mensaje) VALUES('" . $firstname . "', '" . $surname . "', '" . $tlf . "', '" . $emailaddress . "', '" . $mensaje . "')";
    $result = $link->prepare($query);
    $result = $result->execute();
    if (!$result) {
        $errormessage = $link->errorInfo();
        echo json_encode(['code' => 0, 'mensaje' => 'Hubo un error procesando tu mensaje, por favor intentalo de nuevo.']);
        return "Error with query: " . $errormessage;
    }
    /*		@mail("eureka@eureksolutions.com",
    
                        "Mensaje de: ".$firstname." ".$surname,
    
                        "Datos de contacto: ".$tlf."<br><br>".$mensaje,
    
                        "From: ". $emailaddress . "\r\n" . "Content-Type: text/html; charset=utf-8"/*,
    
                        "-fsender@example.com");*/
    // Guardar en archivo.txt
    doLog("Datos de la persona: " . $firstname . " " . $surname . " Teléfono: " . $tlf . " Correo: " . $emailaddress . " Mensaje: " . $mensaje . "", "logs/mensajes.txt");
    // Guardar en archivo CSV
    doLog("" . $firstname . ";" . $surname . ";" . $tlf . ";" . $emailaddress . ";" . $mensaje . "", "logs/mensajes.csv");
    echo json_encode(["code" => 1, "mensaje" => "Listo, tu mensaje ya fue recibido, te contactaremos."]);
    //return  "Listo, tu mensaje ya fue recibido, te contactaremos.";
}
开发者ID:EurekaSolutions,项目名称:eurekaca,代码行数:53,代码来源:send.php

示例4: parseRequest

 function parseRequest()
 {
     global $_SITE_CONFIG;
     $request = $_GET ? $_GET : $_POST;
     $module = $request['module'];
     $method = $request['method'];
     $log = $request;
     $log['paramsArray'] = $this->myAddslashes(unserialize($request['params']));
     doLog($log, empty($_POST) ? '$_GET: ' : '$_POST: ');
     $errCode = 0;
     $errMessage = '';
     if ($_SITE_CONFIG['site_close']) {
         $errCode = 2;
         $errMessage = 'Site Closed';
     } elseif (!$_SITE_CONFIG['my_status']) {
         $errCode = 2;
         $errMessage = 'Manyou Service Disabled';
     } elseif (!$_SITE_CONFIG['site_key']) {
         $errCode = 11;
         $errMessage = 'Client SiteKey NOT Exists';
     } elseif (!$_SITE_CONFIG['my_site_key']) {
         $errCode = 12;
         $errMessage = 'My SiteKey NOT Exists';
     } elseif (empty($module) || empty($method)) {
         $errCode = '3';
         $errMessage = 'Invalid Method: ' . $moudle . '.' . $method;
     }
     if (get_magic_quotes_gpc()) {
         $request['params'] = sstripslashes($request['params']);
     }
     $mySign = $module . '|' . $method . '|' . $request['params'] . '|' . $_SITE_CONFIG['my_site_key'];
     $mySign = md5($mySign);
     if ($mySign != $request['sign']) {
         $errCode = '10';
         $errMessage = 'Error Sign';
     }
     if ($errCode) {
         return new APIErrorResponse($errCode, $errMessage);
     }
     $params = unserialize($request['params']);
     $params = $this->myAddslashes($params);
     if ($module == 'Batch' && $method == 'run') {
         $response = array();
         foreach ($params as $param) {
             $response[] = $this->callback($param['module'], $param['method'], $param['params']);
         }
         return new APIResponse($response, 'Batch');
     }
     return $this->callback($module, $method, $params);
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:50,代码来源:My.class.php

示例5: allSignUp

 public function allSignUp()
 {
     if (!isset($_SESSION['userId'])) {
         $this->error(C('LOGIN_FIRST'));
     }
     doLog($_SESSION['userId'], 33, 'View_allBranchApperance');
     $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
     $this->assign('USER_ID', $_SESSION['userId']);
     $this->assign('CURRENT_MENU', 'SIGNUP');
     $signUp = M('signup');
     try {
         if (isset($_GET['delete'])) {
             // 传入删除参数
             $signUp->where('signupid=' . $_GET['delete'])->delete();
         }
         if (isset($_GET['deleteMulti'])) {
             // 传入删除多项的参数
             $multi = explode(',', $_GET['deleteMulti']);
             for ($index = 1; $index < count($multi); $index++) {
                 // 从第二个开始删除,第一个的产生是由于U方法生成参数的时候无法不输入一个参数
                 if ($multi[$index] != null) {
                     $signUp->where('signupid=' . $multi[$index])->delete();
                 }
             }
         }
     } catch (Exception $e) {
         // 删除错误
         $this->error(C('DELETE_FAIL') . $e->__toString());
         return;
     }
     // 查询当前所有的工作状态并且分页
     $count = $signUp->count();
     $page = new \Think\Page($count, C('PAGE_COUNT'), 'p1');
     $page->setP('p1');
     $orderby['signupid'] = 'desc';
     $list = $signUp->order($orderby)->limit($page->firstRow . ',' . $page->listRows)->select();
     // dump($list);
     // return;
     $this->assign('list', $list);
     // 赋值数据集
     $this->assign('page', $page->show());
     // 赋值分页输出
     $this->display();
 }
开发者ID:ai516001066,项目名称:ProjectAF,代码行数:44,代码来源:SignUpController.class.php

示例6: publishTemplatizedAction

 function publishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '', $specialAppid = 0)
 {
     global $_SITE_CONFIG;
     $db_prefix = getDbPrefix();
     $site_userapp_url = SITE_URL . '/apps/myop/userapp.php';
     $site_cp_url = SITE_URL . '/apps/myop/cp.php';
     if (strpos($titleTemplate, MYOP_URL) === false) {
         $titleTemplate = str_replace('userapp.php', $site_userapp_url, $titleTemplate);
         $titleTemplate = str_replace('cp.php', $site_cp_url, $titleTemplate);
     }
     foreach ($titleData as $k => $v) {
         if (strpos($titleTemplate, MYOP_URL) === false) {
             $v = str_replace('userapp.php', $site_userapp_url, $v);
             $v = str_replace('cp.php', $site_cp_url, $v);
         }
         $titleTemplate = str_replace('{' . $k . '}', $v, $titleTemplate);
     }
     if (strpos($bodyTemplate, MYOP_URL) === false) {
         $bodyTemplate = str_replace('userapp.php', $site_userapp_url, $bodyTemplate);
         $bodyTemplate = str_replace('cp.php', $site_cp_url, $bodyTemplate);
     }
     foreach ($bodyData as $k => $v) {
         if (strpos($bodyTemplate, MYOP_URL) === false) {
             $v = str_replace('userapp.php', $site_userapp_url, $v);
             $v = str_replace('cp.php', $site_cp_url, $v);
         }
         $bodyTemplate = str_replace('{' . $k . '}', $v, $bodyTemplate);
     }
     $titleTemplate = str_replace('{actor}', '', $titleTemplate);
     $bodyTemplate = str_replace('{actor}', '<a href="' . U('home/Space/index', array('uid' => $uId)) . '">' . getUserName($uId) . '</a>', $bodyTemplate);
     $content = array('title' => stripslashes($titleTemplate), 'content' => stripslashes($bodyTemplate), 'image1' => $image1, 'image1Link' => $image1Link, 'image2' => $image2, 'image2Link' => $image2Link, 'image3' => $image3, 'image3Link' => $image3Link, 'image4' => $image4, 'image4Link' => $image4Link);
     doLog($content, 'ContetArray');
     $content = serialize($content);
     $ctime = time();
     $sql = "INSERT INTO {$db_prefix}feed (`uid`,`data`,`type`,`ctime`) VALUES \r\n\t\t\t\t\t   ({$_SITE_CONFIG['uid']}, '{$content}', 'myop_feed','{$ctime}')";
     $result = doQuery($sql);
     return new APIResponse($result);
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:38,代码来源:Feed.class.php

示例7: logTest

 public function logTest()
 {
     doLog(1, 2, '中文测试');
 }
开发者ID:ai516001066,项目名称:LNZM,代码行数:4,代码来源:LogController.class.php

示例8: while

                $response->records = $count;
                $i = 0;
                while ($row = pg_fetch_assoc($result)) {
                    //doLog(print_r($row,true));
                    $vip = $row[$hfield_guests . '_vip'] === 'f' ? 0 : 1;
                    $response->d[$i] = array("id" => $row[$hfield_guests . '_id'], "group" => $row[$hfield_groups . '_name'], "seat" => $row[$hfield_seatings . '_id'], "title" => $row[$hfield_titles . '_name'], "VIP" => $vip, "lastname" => $row[$hfield_guests . '_lastname'], "firstname" => $row[$hfield_guests . '_firstname'], "display" => $row[$hfield_guests . '_display'], "gender" => $row[$hfield_genders . '_name'], "age" => $row[$hfield_ages . '_name'], "meal" => $row[$hfield_meals . '_name'], "request" => $row[$hfield_requests . '_name'], "RSVP" => $row[$hfield_rsvps . '_name']);
                    //doLog("data:".join($row,","));
                    $i++;
                }
                $response->status = 0;
                $response->responseText = "Successful.";
            } else {
                $response->status = 1;
                $response->responseText = "Cannot execute query: {$query}, Error" . pg_last_error($connection);
            }
        } else {
            $response->status = 1;
            $response->responseText = "Cannot execute query: {$query}, Error" . pg_last_error($connection);
        }
}
doLog("Preparing the reponse");
if ($custom_status !== 200) {
    header("Content-type: application/json;charset=utf-8");
    header('X-Error-Message: ' . $custom_error, true, $custom_status);
    die;
} else {
    header("Content-type: application/json;charset=utf-8");
    header("HTTP/1.0 200 OK");
    //doLog(json_encode($response));
    echo json_encode($response);
}
开发者ID:digitaltech,项目名称:tabledesigner4,代码行数:31,代码来源:grid_guests_list.php

示例9: editUserSubmit

    public function editUserSubmit()
    {
        if (!isset($_SESSION['userId'])) {
            $this->error(C('LOGIN_FIRST'));
        }
        $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
        $this->assign('USER_ID', $_SESSION['userId']);
        $this->assign('USER_LEVEL', $_SESSION['userLevel']);
        $this->assign('CURRENT_MENU', 'SYSTEMSETTING');
        $user = M('user');
        $data['userId'] = $_GET['userid'];
        $data['userNickname'] = $_POST['usernickname'];
        $data['userPassword'] = $_POST['userpassword'];
        $data['userAddress'] = $_POST['useraddress'];
        $data['userTelnumber'] = $_POST['usertelnumber'];
        $data['userDescription'] = $_POST['userdescription'];
        $data['userAcademy'] = $_POST['useracademy'];
        $data['userMail'] = $_POST['usermail'];
        $data['userAcademy'] = $_POST['useracademy'];
        $data['userBranch'] = $_POST['userbranch'];
        // dump($data);
        // return;
        $result = $user->save($data);
        if ($result !== false) {
            // echo U('WorkTendency/allPage');
            doLog($_SESSION['userId'], 26, 'Edit_User_Submit_id_:_' . $_GET['userid']);
            echo '
					<head>
						<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
					</head>
					<h1 style="line-height:400px;text-align:center">成功,1秒后自动关闭</h1>
					<script language="javascript">
						function closeWindow(){
							window.opener=null;
							window.open("","_self")
							window.close();
						}
						setTimeout("closeWindow()",1000);
	
					</script>';
            // $this->success ( C ( 'EDIT_SUCCESS' ), '/WorkTendency/allPage' );
        } else {
            $this->error(C('EDIT_FAIL'));
        }
    }
开发者ID:ai516001066,项目名称:LNZM,代码行数:45,代码来源:SystemSettingController.class.php

示例10: printf

                    printf("# EDIT %s <fail> <%s> (%d): <%s> (<%s>)\n", $typeMap[$pages[$pageId]['bad']], $query['title'], $pageId, $data2['error']['info'], $data2['error']['code']);
                    $log .= sprintf("# EDIT (Fehlgeschlagen [%s]) %s [{{fullurl:%s|curid=%d&oldid=%d}} %s]\n", htmlentities($data2['error']['info'], ENT_QUOTES, 'UTF-8'), $typeMap[$pages[$pageId]['bad']], $query['title'], $pageId, $query['lastrevid'], $query['title']);
                    unset($stockIds[$pageId]);
                } else {
                    fail('Edit fehlgeschlagen', $result);
                }
            } else {
                printf("# EDIT %s <%s> <%s> (%d) (old %d) (new %d)  Sleeping ", $typeMap[$pages[$pageId]['bad']], $data2['edit']['result'], $data2['edit']['title'], $data2['edit']['pageid'], $data2['edit']['oldrevid'], $data2['edit']['newrevid']);
                //    var_dump($data2);
                //    var_dump($pages[$pageId]);
                $log .= sprintf("# EDIT (%s) %s [{{fullurl:%s|curid=%d&diff=%d&oldid=%d}} %s] by [[{{subst:FULLPAGENAME:User:%s}}|]]\n", $data2['edit']['result'], $typeMap[$pages[$pageId]['bad']], $data2['edit']['title'], $pageId, $data2['edit']['newrevid'], $data2['edit']['oldrevid'], $data2['edit']['title'], $pages[$pageId]['rev_user_text'], $pages[$pageId]['rev_user_text']);
                for ($i = 19; $i > 0; --$i) {
                    print $i . ' ';
                    usleep(900000);
                }
                print "0\n";
            }
        }
    } while (false);
}
if ($stockIds) {
    mysql_query('
	DELETE FROM
	  `u_revolus`.`bestandscheck`
	WHERE
	  `page_id` IN (' . implode(', ', $stockIds) . ')
	', $link) or fail(mysql_error());
}
doLog();
curl_close($curl);
mysql_close($link);
开发者ID:Revolus,项目名称:RevoBot,代码行数:31,代码来源:mysqlbot2.php

示例11: doLog

                if ($start < 0) {
                    $start = 0;
                }
                $query = "select * from " . DB_SCHEMA . ".{$table} where deleted = 0 order by {$sidx} {$sord}  LIMIT {$limit} OFFSET {$start}";
                doLog($query);
                $result = pg_query($connection, $query) or die("Cannot execute query: {$query}\n");
                $response->page = $page;
                $response->total = $total_pages;
                $response->records = $count;
                $i = 0;
                while ($row = pg_fetch_assoc($result)) {
                    $response->d[$i] = array("id" => $row[$hfield . '_id'], "name" => $row[$hfield . '_name'], "note" => $row[$hfield . '_note']);
                    doLog("id=>" . $row[$hfield . '_id'] . " name=>" . $row[$hfield . '_name'] . " note=>" . $row[$hfield . '_note']);
                    $i++;
                }
                $response->status = 0;
                $response->responseText = "Successful.";
            } else {
                $response->status = 1;
                $response->responseText = "Cannot execute query: {$query}";
            }
    }
} else {
    $response->page = 1;
    $response->total = 1;
    $response->records = 0;
}
doLog("Preparing the reponse");
header("Content-type: application/json;charset=utf-8");
doLog(json_encode($response));
echo json_encode($response);
开发者ID:digitaltech,项目名称:tabledesigner4,代码行数:31,代码来源:grid_guests_subgrid.php

示例12: editBranchApperanceSubmit

    public function editBranchApperanceSubmit()
    {
        if (!isset($_SESSION['userId'])) {
            $this->error(C('LOGIN_FIRST'));
        }
        $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
        $this->assign('USER_ID', $_SESSION['userId']);
        $this->assign('USER_LEVEL', $_SESSION['userLevel']);
        $this->assign('CURRENT_MENU', 'BRANCHAPPERANCE');
        $branchapperance = M('branchapperance');
        $data['branchApperanceId'] = $_GET['branchapperanceid'];
        $data['branchApperanceTitle'] = $_POST['branchapperanceTitle'];
        $data['branchApperanceReleaseId'] = $_POST['branchapperancereleaseid'];
        $data['branchApperanceAcademy'] = $_POST['branchapperanceacademy'];
        $data['branchApperanceBranch'] = $_POST['branchapperancebranch'];
        // 		dump ( $_POST ['branchapperancebranch']);
        // 		return;
        // $workTendency-> where('worktendencyid=' . $_GET['worktendencyid'])->setField('worktendencytitle',$_POST['workTendencyTitle']);
        // $workTendency-> where('worktendencyid=' . $_GET['worktendencyid'])->setField('worktendencyreleaseid',$_POST['workTendencyReleaseId']);
        // $workTendency-> where('worktendencyid=' . $_GET['worktendencyid'])->setField('worktendencyreleasedate',date ( 'Y-m-d H:i:s', time () ));
        // 创建内容的html文件
        $myFilePath = C('APPLICATION_CONTENTHTML_PATH') . '/' . time() . rand() . '.html';
        $myFile = fopen($myFilePath, "w") or die("Unable to open file!");
        fwrite($myFile, $_POST['editor']);
        fclose($myFile);
        $data['branchApperanceContentURL'] = $myFilePath;
        // $workTendency-> where('workTendencyId=' . $_GET['worktendencyid'])->setField('worktendencycontenturl',$myFilePath);
        $result = $branchapperance->save($data);
        doLog($_SESSION['userId'], 36, 'Edit_BranchApperance_submit_Id_:_' . $_GET['branchapperanceid']);
        if ($result !== false) {
            // echo U('WorkTendency/allPage');
            echo '
					<head>
						<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
					</head>
					<h1 style="line-height:400px;text-align:center">成功,1秒后自动关闭</h1>
					<script language="javascript">
						function closeWindow(){
							window.opener=null;
							window.open("","_self")
							window.close();
						}
						setTimeout("closeWindow()",1000);
						
					</script>';
            // $this->success ( C ( 'EDIT_SUCCESS' ), '/WorkTendency/allPage' );
        } else {
            $this->error(C('EDIT_FAIL'));
        }
    }
开发者ID:ai516001066,项目名称:ProjectAF,代码行数:50,代码来源:BranchApperanceController.class.php

示例13: mkdir

        mkdir(LOG);
    }
    $file = LOG . '/report.log';
    // Write the contents back to the file
    //echo "do loging to $file";
    file_put_contents($file, "{$log}\n", FILE_APPEND | LOCK_EX);
}
$l = $_POST['l'];
// get the requested page
$e = $_POST['e'];
// get the requested page
$v = $_POST['v'];
// get the requested page
doLog("Parameters received : \n" . "\te = " . $e . "\n" . "\tv = " . $v . "\n" . "\tl = " . $l . "\n" . "\tHost = " . DB_HOST . "\n" . "\tPort = " . DB_PORT . "\n" . "\tDBName = " . DB_NAME . "\n" . "\tUser = " . DB_USER . "\n" . "\tPwd = " . DB_PASSWORD);
// connect to pgsql
$connection = pg_Connect(DSN) or die("Could not connect to server\n");
pg_query($connection, "set names 'utf8'");
$query = "select t.title_name, g.guest_firstname, g.guest_lastname, g.guest_display, s.seating_id, cast(substr(s.seating_id,5) as integer)\nfrom " . DB_SCHEMA . ".seatings s,  " . DB_SCHEMA . ".guests g, " . DB_SCHEMA . ".titles t\nwhere s.guest_id = g.guest_id\nand g.title_id = t.title_id\nand s.event_id = " . $e . "\nand s.layout_id = (select layout_id from " . DB_SCHEMA . ".layouts where layout_name='" . $l . "' and venue_id=" . $v . ") order by 6 asc";
doLog($query);
$result = pg_query($connection, $query);
if ($result) {
    while ($row = pg_fetch_array($result)) {
        $response[] = $row;
    }
    header("Content-type: application/json;charset=utf-8");
    doLog(json_encode($response));
    echo json_encode($response);
} else {
    doLog("Failed to execute the query : " . pg_last_error($connection));
    die("Cannot execute query: {$query}\n");
}
开发者ID:digitaltech,项目名称:tabledesigner4,代码行数:31,代码来源:report.php

示例14: editDownloadSubmit

    public function editDownloadSubmit()
    {
        if (!isset($_SESSION['userId'])) {
            $this->error(C('LOGIN_FIRST'));
        }
        $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
        $this->assign('USER_ID', $_SESSION['userId']);
        $this->assign('USER_LEVEL', $_SESSION['userLevel']);
        $this->assign('CURRENT_MENU', 'WORKTENDENCY');
        $download = M('download');
        $data['downloadId'] = $_GET['downloadid'];
        $data['downloadTitle'] = $_POST['downloadTitle'];
        // 		dump($data);
        // 		return;
        // 文件上传
        $upload = new \Think\Upload();
        // 实例化上传类
        $upload->maxSize = 3145728;
        // 设置附件上传大小
        $upload->exts = array('jpg', 'gif', 'png', 'jpeg', 'doc', 'docx', 'apk', 'xls', 'ppt', 'pptx', 'rar', 'zip', 'pdf');
        // 设置附件上传类型
        $upload->rootPath = C('APPLICATION_DOWNLOAD_PATH');
        // 设置附件上传根目录
        // $upload->savePath = 'Download'; // 设置附件上传(子)目录
        // 上传文件
        $info = $upload->upload();
        doLog($_SESSION['userId'], 8, 'edit_Download_Submit_Id_:_' . $_GET['downloadid']);
        if (!$info) {
            // 上传错误提示错误信息
            echo '
					<head>
						<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
					</head>
					<h1 style="line-height:400px;text-align:center">上传错误:' . $upload->getError() . ',1秒后自动关闭</h1>
					<script language="javascript">
						function closeWindow(){
							window.opener=null;
							window.open("","_self")
							window.close();
						}
						setTimeout("closeWindow()",1000);
						
					</script>';
            return;
        } else {
            // 上传成功 获取上传文件信息
            foreach ($info as $file) {
                // echo $file['savepath'].$file['savename'].'<br />';
                // echo $file['name'];
                $data['fileName'] = $file['name'];
                $data['downloadURL'] = $file['savename'];
            }
        }
        // $workTendency-> where('workTendencyId=' . $_GET['worktendencyid'])->setField('worktendencycontenturl',$myFilePath);
        $result = $download->save($data);
        if ($result !== false) {
            // echo U('WorkTendency/allPage');
            echo '
					<head>
						<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
					</head>
					<h1 style="line-height:400px;text-align:center">成功,1秒后自动关闭</h1>
					<script language="javascript">
						function closeWindow(){
							window.opener=null;
							window.open("","_self")
							window.close();
						}
						setTimeout("closeWindow()",1000);
						
					</script>';
            // $this->success ( C ( 'EDIT_SUCCESS' ), '/WorkTendency/allPage' );
        } else {
            $this->error(C('EDIT_FAIL'));
        }
    }
开发者ID:ai516001066,项目名称:PFP,代码行数:76,代码来源:DownloadController.class.php

示例15: echoRespnse

     $response["Mesaj"] = "Giriş Yapılmadı";
     echoRespnse(200, $response);
     return;
 }
 $SoruID = $app->request->post("SoruID");
 $ResimNo = $app->request->post("ResimNo");
 doLog($ResimNo);
 $Oy = false;
 if ($ResimNo == 0) {
     $Oy = false;
 } else {
     if ($ResimNo == 1) {
         $Oy = true;
     }
 }
 doLog($Oy);
 if (isset($SoruID) && isset($UyeID) && isset($ResimNo)) {
     if ($db->OyladiMi($UyeID, $SoruID) == false) {
         if ($db->Oyla($UyeID, $SoruID, $Oy) == false) {
             $response["Sonuc"] = false;
             $response["Mesaj"] = "Oy Eklenemedi";
         } else {
             $response["Sonuc"] = true;
             $response["Mesaj"] = "Oy Eklendi";
         }
     } else {
         if ($db->OyGuncelle($UyeID, $SoruID, $Oy) == false) {
             $response["Sonuc"] = false;
             $response["Mesaj"] = "Oy Güncellenemedi";
         } else {
             $response["Sonuc"] = true;
开发者ID:DevelOguzhan,项目名称:Omubumu,代码行数:31,代码来源:index.php


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