public function doc($id) { $curl = new FCurl(); $url = $this->dbUrl() . '/' . $id . '/'; $result = $curl->request($url, 'json', 'get', false); return $result; }
function paging($request, $requestParam, $requestResultNum, $callbackFunctionName) { $requestParam['page'] = isset($requestParam['page']) ? $requestParam['page'] : 1; $currentPage = $requestParam['page']; $currentPageNum = getPagingNumByRequestName($request); $returnHtml = '<div class="center-align">'; $returnHtml .= '<ul class="pagination">'; if ($requestResultNum) { if ($currentPage == 1) { $returnHtml .= '<li class="disabled"><a href="#!"><i class="mdi-navigation-chevron-left"></i></a></li>'; } else { $requestParam['page']--; $returnHtml .= '<li class="waves-effect"><a href="' . $callbackFunctionName . '?' . http_build_query($requestParam) . '"><i class="mdi-navigation-chevron-left"></i></a></li>'; $requestParam['page']++; } $requestParam['page']++; if ($callbackFunctionName == 'contact_hash.php') { $tagListTmp = $_REQUEST['tagList']; $tagListTmp = explode('^', $tagListTmp); array_shift($tagListTmp); $tagListTmp = implode('&', $tagListTmp); $nextPageDaraNum = FCurl::get($request, $requestParam + array('accessToken' => $_COOKIE['accessToken'], 'num' => getPagingNumByRequestName($request), 'name' => $tagListTmp)); } elseif ($callbackFunctionName == 'contact_info.php' || $callbackFunctionName == 'user.php') { $nextPageDaraNum = FCurl::get($request, $requestParam + array('accessToken' => $_COOKIE['accessToken'], 'num' => getPagingNumByRequestName($request))); $nextPageDaraNum = $nextPageDaraNum['returnData']; } else { $nextPageDaraNum = FCurl::get($request, $requestParam + array('accessToken' => $_COOKIE['accessToken'], 'num' => getPagingNumByRequestName($request))); } if (count($nextPageDaraNum)) { $returnHtml .= '<li class="waves-effect"><a href="' . $callbackFunctionName . '?' . http_build_query($requestParam) . '"><i class="mdi-navigation-chevron-right"></i></a></li>'; } else { $returnHtml .= '<li class="disabled"><a href="#!"><i class="mdi-navigation-chevron-right"></i></a></li>'; } } $returnHtml .= '</ul><br><br>'; $returnHtml .= '</div>'; return $returnHtml; }
<ul class="right hide-on-med-and-down"> </ul> <?php require_once 'left2.php'; ?> <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a> </div> </nav> </div> <main> <div> <div class="section"> <?php $contactLsit = FCurl::get('user/getUserProfileList', array('accessToken' => $_COOKIE['accessToken'])); ?> <table class="hoverable"> <thead> <tr> <th data-field="photo">头像</th> <th data-field="name">姓名</th> <th data-field="tel">电话</th> </tr> </thead> <tbody> <?php foreach ($contactLsit as $value) { ?> <tr>
</div> <div class="col s12 select-field"> <label>群组性质</label> <input name="group_type" id="group_type" value="1" style="display: none;" /> <select class="browser-default" id="group_type_select"> <option value="1" selected >房间</option> <option value="0">普通群组</option> </select> <label>所属项目</label> <input name="group_project" id="group_project" value="15" style="display: none;" /> <select class="browser-default" id="group_project_select"> <?php $param['accessToken'] = $_COOKIE['accessToken']; $project = FCurl::get('tag/getALLProjectInfo', $param); foreach ($project as $key => $projectIndex) { if ($key == 0) { echo '<option value="' . $projectIndex['id'] . '" selected >' . $projectIndex['name'] . '</option>'; } else { echo '<option value="' . $projectIndex['id'] . '" >' . $projectIndex['name'] . '</option>'; } } ?> </select> </div> </div> <div class="section center-align"> <button class="btn waves-effect waves-light deep-orange" type="submit">
?> </a> <?php } ?> </div> <div class="col s3 right-align"> <a href="#modalTags" class="modal-trigger btn-floating waves-effect waves-light deep-orange"> <i class="mdi-maps-local-offer"></i> </a> <div id="modalTags" class="modal bottom-sheet left-align"> <div class="modal-content"> <h5><i class="mdi-maps-local-offer"></i> 标签</h5> <?php $tagList = FCurl::get('tag/getListByAllSystem'); foreach ($tagList as $value) { echo '<div class="divider"></div><p>'; foreach ($value as $index) { $name = $index['name']; echo '<a onclick="add(' . "'{$name}'" . ')" class="text-mid ' . $index['color'] . '">' . $name . '</a>'; echo "\n"; } echo '</p>'; } ?> </div> </div> </div> </div>
$photoTool->flip(IMG_PATH_BASE . $filePath, IMG_PATH_BASE . $filePath, -90); $widthTmp = $photoInfo['width']; $photoInfo['width'] = $photoInfo['height']; $photoInfo['height'] = $widthTmp; } unset($exifInfo); $photoTool->copyImageWithSize(IMG_PATH_BASE . $filePath, IMG_PATH_BASE . $filePathSmall, $photoInfo['width'], $photoInfo['height']); $photo = $filePathSmall; } else { $photo = ''; } $param['accessToken'] = $_COOKIE['accessToken']; $param['phoneNum'] = $_POST['phoneNum']; $param['password'] = $_POST['password']; $param['photo'] = $photo; FCurl::get('user/updateProfile', $param); echo '<script> alert("success"); window.location.href="quan.php"; </script> '; } ?> <div class="navbar-fixed"> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" class="dropdown-button brand-logo" href="#!" data-activates="dropdown-quan"> 设置 </a> <?php
<table class="hoverable"> <thead> <tr> <th data-field="rank">排名</th> <th data-field="id">姓名</th> <th data-field="name">所属项目</th> <th data-field="week_num">本周发布信息数</th> <th data-field="total_num">累计发布信息数</th> <th data-field="new_content_num">本周新增联系人数</th> <th data-field="new_group_num">本周新增群组数</th> </tr> </thead> <tbody> <?php $countResult = FCurl::get('statistics/overview', array('type' => 'event')); $rank = 1; foreach ($countResult as $key => $value) { $projectInfo = array(); foreach ($value['projectInfo'] as $projectInfoIndex) { $projectInfo[] = $projectInfoIndex['name']; } ?> <tr> <td><?php echo $rank; ?> </td> <td><a href="user.php?userId=<?php echo $value['userId']; ?>
$param['password'] = $_POST['password']; $param['nickname'] = $_POST['nickname']; $param['project'] = $_POST['project']; $userId = FCurl::get('user/createUserAccount', $param); if (isset($_FILES['photo']) && $_FILES['photo']['error'] == 0) { #存在上传头像文件且上传成功 $filePath = 'avatar/' . $userId . '_' . md5_file($_FILES['photo']['tmp_name']) . '.' . end(explode('.', $_FILES['photo']['name'])); #修正图片大小 require_once 'lib/photo.class.php'; $photoTool = new photo(); $photoTool->copyImageWithSize($_FILES['photo']['tmp_name'], IMG_PATH_BASE . $filePath, 120, 120); $param = array(); $param['userId'] = $userId; $param['photo'] = $filePath; FCurl::get('user/updateUserPhoto', $param); FCurl::header('user_add.php'); } } ?> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" class="dropdown-button brand-logo" href="#!" data-activates="dropdown-quan">添加用户</a> <?php require_once 'left.php'; ?> </div> </nav> <main>
<label for="mobile"><?php echo $value['showName']; ?> </label> </div> <?php } ?> </div> <div class="col s12"> <a href="#modalItems" class="modal-trigger btn-floating waves-effect waves-light teal lighten-1"><i class="mdi-content-add"></i></a> <div id="modalItems" class="modal bottom-sheet"> <div class="modal-content"> <h5><i class="mdi-action-dns"></i> 条目</h5> <?php $tagList = FCurl::get('tag/getGroupProfileList'); foreach ($tagList as $value) { echo '<div class="divider"></div><p>'; foreach ($value as $index) { $name = $index['name']; $key = $index['formKey']; echo '<a href="#!" onclick="add(' . "'{$name}'" . ', ' . "'{$key}'" . ')" class="modal-action modal-close btn ' . $index['color'] . '">' . $name . '</a>'; echo "\n"; } echo '</p>'; } ?> </div> </div> </div>
<div class="row grey lighten-4"> <div class="col s12"> <div class="row"> <div class="col s12 input-field"> <i id="active_i" class="mdi-editor-mode-edit prefix"></i> <textarea id="eventList" class="materialize-textarea" name="event" ></textarea> <label id="active_label" for="eventList">应聘职位</label> </div> </div> <a href="#modalTags" class="modal-trigger btn-floating waves-effect waves-light teal lighten-1"><i class="mdi-maps-local-offer"></i></a> <div id="modalTags" class="modal bottom-sheet"> <div class="modal-content"> <h5><i class="mdi-maps-local-offer"></i>应聘职位</h5> <?php $tagList = FCurl::get('tag/getAuditionTag'); foreach ($tagList as $value) { echo '<div class="divider"></div><p>'; foreach ($value as $index) { $name = $index['name']; echo '<a href="#!" onclick="add(' . "'{$name}'" . ')" class="modal-action modal-close btn ' . $index['color'] . '">' . $name . '</a>'; echo "\n"; } echo '</p>'; } ?> </div> </div> </div> </div>
$param['phoneNum'] = $_POST['phoneNum']; $param['occupation'] = $_POST['event']; FCurl::get('contact/update', $param); } #追加事件信息 $param = array(); $param['id'] = $userId; $param['accessToken'] = 'vPoGp4lHm6'; $isFirst = $_POST['group1']; $param['systemEvent'] = true; if ($isFirst == '#初试') { $param['event'] = $isFirst . ' #候选人 #职业 ' . $_POST['event'] . ' @王则琼'; } else { $param['event'] = $isFirst . ' @王则琼'; } FCurl::get('user/createEventForContact', $param); echo '<script type="text/javascript" charset="utf-8" async defer> alert("提交成功,请等待."); window.location.href="audition_index.php"; </script>'; } ?> <body> <?php require_once 'blank.php'; ?> <div class="navbar-fixed"> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <ul class="left">
<?php require_once 'left2.php'; ?> <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a> </div> </nav> </div> <main> <div class="section"> <?php $accessToken = $_COOKIE['accessToken']; $param['page'] = isset($_GET['page']) ? $_GET['page'] : 1; $param['num'] = getPagingNumByRequestName('user/getLikeEventUserList'); $likeInfo = FCurl::get('user/getLikeEventUserList', $param + array('accessToken' => $accessToken)); foreach ($likeInfo as $value) { $userId = $value['createUserId']; if ($value['eventType'] == 'group') { if ($value['enable_open']) { echo '<div class="row"> <div class="col s12"> <h5>' . getUserPhoto($value['createUserPhoto'], 30) . $value['createUser'] . '</h5> <div class="flow-text">' . eventTranslate($value['eventContent']) . '<a href="#">' . $value['noticeUser'] . '</a>' . getEventPhoto($value['photo']) . '</div> <div class="row grey lighten-3" onclick="window.location=' . "'" . "group_info.php?from=quan&id=" . $userId . "'" . '" > <div class="col s2"><i class="small grey-text text-darken-2 mdi-social-location-city prefix"></i></div>'; } else { echo '<div class="row"> <div class="col s12"> <h5>' . getUserPhoto($value['createUserPhoto'], 30) . $value['createUser'] . '</h5> <div class="flow-text">' . eventTranslate($value['eventContent']) . '<a href="#">' . $value['noticeUser'] . '</a>' . getEventPhoto($value['photo']) . '</div>
<a href="javascript:deleteRelation(' . $valueIndex['userId'] . ',' . $groupId . ',\'' . $_COOKIE['accessToken'] . '\')" class="secondary-content"> <i class="mdi-navigation-cancel"></i></a></div> </li>'; } } ?> </ul> <div class="row grey lighten-4"> <div class="col s12"> <a id="savaData_a" href="#modalItems_addType" class="modal-trigger right btn-floating waves-effect waves-light teal lighten-1"><i id="saveData_a" class="mdi-content-add"></i></a> <div id="modalItems_addType" class="modal bottom-sheet"> <div class="modal-content"> <h5><i class="mdi-action-dns"></i> 添加种类</h5> <?php $tagList = FCurl::get('group/getGroupRelationTypeList'); echo '<div class="divider"></div><p>'; foreach ($tagList as $value) { $name = $value['name']; echo '<a href="group_seach.php?id=' . $groupId . '&type=' . $name . '" class="group-seach modal-action modal-close btn ' . $value['color'] . '">' . $name . '</a>'; echo ' '; } echo '</p>'; ?> </div> </div> </div> </div> </form> </div>
<?php require_once 'header.php'; if ($_POST) { $param['name'] = $_POST['tag_name']; $param['type'] = $_POST['tag_type']; $param['color'] = isset($_POST['color']) ? $_POST['color'] : ''; $param['keyName'] = isset($_POST['form_name']) ? $_POST['form_name'] : ''; FCurl::get('tag/createNoAccessToken', $param); } ?> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" class="dropdown-button brand-logo" href="#!" data-activates="dropdown-quan">添加标签</a> <?php require_once 'left.php'; ?> </div> </nav> <main> <div class="section"> <div class="row"> <form action="#" method="post" enctype="multipart/form-data"> <div class="row"> <div class="col s12 input-field"> <input id="tag_name" type="text" class="validate" length="20" required name="tag_name"> <label for="tag_name">标签名称</label>
<?php require_once 'header.php'; $seach = isset($_GET['seach']) ? $_GET['seach'] : ''; $from = 'group_room'; $param['accessToken'] = $_COOKIE['accessToken']; $param['page'] = isset($_GET['page']) ? $_GET['page'] : 1; $param['num'] = DEFAULT_MESSAGE_NUM; if ($seach) { $param['name'] = $seach; } $seachResult = FCurl::get('group/seachRoomByName', $param); ?> <body> <?php require_once 'blank.php'; ?> <div class="navbar-fixed"> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" href="#" class="brand-logo">房间搜索</a> <ul class="right"> <li><a href="./group_add.php"><i class="mdi-content-add"></i></a></li> </ul> <?php require_once 'left2.php'; ?> <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a> </div> </nav>
$photoTool->flip(IMG_PATH_BASE . $filePath, IMG_PATH_BASE . $filePath, -90); $widthTmp = $photoInfo['width']; $photoInfo['width'] = $photoInfo['height']; $photoInfo['height'] = $widthTmp; } unset($exifInfo); $photoTool->copyImageWithSize(IMG_PATH_BASE . $filePath, IMG_PATH_BASE . $filePathSmall, $photoInfo['width'], $photoInfo['height']); } $param['accessToken'] = $_COOKIE['accessToken']; $param['event'] = $_POST['event']; $param['id'] = $_POST['id']; if (isset($filePathSmall) && $filePathSmall) { $param['photo'] = $filePathSmall; } FCurl::get('group/createEvent', $param); FCurl::header('group_info.php?id=' . $groupId); } ?> <body> <?php require_once 'blank.php'; ?> <div class="navbar-fixed"> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" href="#" class="brand-logo">新增跟进</a> <ul class="right hide-on-med-and-down"> </ul> <ul class="left">
?> <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a> </div> </nav> </div> <main> <div class="section"> <?php $accessToken = $_COOKIE['accessToken']; $param['accessToken'] = $accessToken; $param['tagId'] = isset($_GET['tagId']) && $_GET['tagId'] ? $_GET['tagId'] : ''; $param['page'] = isset($_GET['page']) ? $_GET['page'] : 1; $param['num'] = DEFAULT_MESSAGE_NUM; $callFunctionName = isset($_GET['tagId']) ? 'user/getEventListByGroupId' : 'user/getEventList'; $eventList = FCurl::get($callFunctionName, $param); foreach ($eventList as $value) { echo '<div class="row"> <div class="col s2">'; echo getUserPhoto($value['createUserPhoto']); echo '</div> <div class="col s10"> <h5><a class="blue-text text-darken-4" href="./user.php?userId=' . $value['eventCreateUserId'] . '">' . $value['createUserName'] . '</a></h5> <div class="flow-text">' . eventTranslate($value['eventContent']); //$value['eventContantUser'] = explode(',', $value['eventContantUser']); foreach ($value['eventContantUser'] as $eventContantUserIndex) { echo attranslate($eventContantUserIndex); } echo getEventPhoto($value['photo'], 100); $userId = $value['createUserId']; if ($value['enable_open']) {
/** * 发出POST请求 * * @access public * @param string $url * @param string $params POST请求参数 */ public function post($url, $params = NULL) { $result = FCurl::post(BASEURL . $url, $params); echo "<pre>{$result}</pre>"; return $this->parseJson($result); }
<?php require_once 'header.php'; $groupId = isset($_GET['id']) ? $_GET['id'] : 0; $pageFrom = isset($_GET['from']) ? $_GET['from'] : 'group_index'; $param['accessToken'] = $_COOKIE['accessToken']; $param['id'] = $groupId; $groupInfo = FCurl::get('group/get', $param); $seeEnable = FALSE; if (!empty($groupInfo)) { $param = array(); $param['accessToken'] = $_COOKIE['accessToken']; $param['id'] = $groupId; $param['page'] = isset($_GET['page']) ? $_GET['page'] : 1; $param['num'] = isset($_GET['num']) ? $_GET['num'] : DEFAULT_MESSAGE_NUM; $groupEventInfo = FCurl::get('group/getEventList', $param); $seeEnable = TRUE; } ?> <body> <?php require_once 'blank.php'; ?> <div class="navbar-fixed"> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" href="#" class="brand-logo">群组信息</a> <ul class="right hide-on-med-and-down"> </ul> <ul class="left">
private static function build_http_query_multi($params, $content_type = NULL) { if (!$params) { return ''; } uksort($params, 'strcmp'); $pairs = array(); self::$boundary = $boundary = uniqid('------------------'); $MPboundary = '--' . $boundary; $endMPboundary = $MPboundary . '--'; $multipartbody = ''; foreach ($params as $key => $value) { if (in_array($key, array('data', 'photo', 'file', 'image')) && $value[0] == '@') { $url = ltrim($value, '@'); $content = file_get_contents($url); $array = explode('?', basename($url)); $filename = $array[0]; $multipartbody .= $MPboundary . "\r\n"; $multipartbody .= 'Content-Disposition: form-data; name="' . $key . '"; filename="' . $filename . '"' . "\r\n"; if ($content_type) { $multipartbody .= "Content-Type: " . $content_type . "\r\n\r\n"; } else { $multipartbody .= "Content-Type: " . self::get_mime_type($filename) . "\r\n\r\n"; } $multipartbody .= $content . "\r\n"; } else { $multipartbody .= $MPboundary . "\r\n"; $multipartbody .= 'Content-Disposition: form-data; name="' . $key . "\"\r\n\r\n"; $multipartbody .= $value . "\r\n"; } } $multipartbody .= $endMPboundary; return $multipartbody; }
<?php require_once 'header.php'; error_reporting(0); if ($_GET['userId']) { $accessToken = $_COOKIE['accessToken']; $param['accessToken'] = $_COOKIE['accessToken']; $param['userId'] = $_GET['userId']; $param['page'] = isset($_GET['page']) ? $_GET['page'] : 1; $param['num'] = DEFAULT_MESSAGE_NUM; $userEventList = FCurl::get('user/getUserEventList', $param); $currentUserName = $userEventList['currentUserNickname']; } else { echo '<script>alert("错误的调用");history.back(1);</script>'; } ?> <body> <?php require_once 'blank.php'; ?> <div class="navbar-fixed"> <nav class="teal lighten-1" role="navigation"> <div class="nav-wrapper"> <a id="logo-container" href="#" class="brand-logo"><?php echo $userEventList['seachUserNickname']; ?> </a> <ul class="left"> <li><a href="javascript:history.back(1)"><i class="mdi-image-navigate-before"></i></a></li> <li><a href="quan.php"><i class="mdi-image-camera"></i></a></li> </ul>
<?php require_once 'left2.php'; ?> <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a> </div> </nav> </div> <main> <div class="section"> <?php $accessToken = $_COOKIE['accessToken']; $param['page'] = isset($_GET['page']) ? $_GET['page'] : 1; $param['num'] = getPagingNumByRequestName('user/getNoticeList'); $noticeInfo = FCurl::get('user/getNoticeList', $param + array('accessToken' => $accessToken)); foreach ($noticeInfo as $value) { // print_r($value); echo '<div class="row"> <div class="col s2">'; echo getUserPhoto($value['createUserPhoto']); echo '</div> <div class="col s10"> <h5><a class="blue-text text-darken-4" href="#">' . $value['createUser'] . '</a></h5> <div class="flow-text">' . eventTranslate($value['noticeContent']); foreach ($value['noticeUser'] as $noticeUserIndex) { echo attranslate($noticeUserIndex); } echo getEventPhoto($value['photo']); $userId = $value['createUserId']; if ($value['enable_open']) {
echo $value[$key]; ?> </label> </div> <?php } ?> </div> <div class="col s12"> <a href="#modalItems" class="modal-trigger btn-floating waves-effect waves-light teal lighten-1"><i class="mdi-content-add"></i></a> <div id="modalItems" class="modal bottom-sheet"> <div class="modal-content"> <h5><i class="mdi-action-dns"></i> 条目</h5> <?php $tagList = FCurl::get('tag/getUserProfileList'); foreach ($tagList as $value) { echo '<div class="divider"></div><p>'; foreach ($value as $index) { $name = $index['name']; $key = $index['formKey']; echo '<a href="#!" onclick="add(' . "'{$name}'" . ', ' . "'{$key}'" . ')" class="modal-action modal-close btn ' . $index['color'] . '">' . $name . '</a>'; echo "\n"; } echo '</p>'; } ?> </div> </div> </div>