本文整理汇总了PHP中get_return_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_return_url函数的具体用法?PHP get_return_url怎么用?PHP get_return_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_return_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _update
protected function _update()
{
$id = $_POST["id"];
$model = M("MailOrganize");
$model->where("id={$id}")->delete();
$model = D("MailOrganize");
if (false === $model->create()) {
$this->error($model->getError());
}
if (in_array('user_id', $model->getDbFields())) {
$model->user_id = get_user_id();
}
if (in_array('user_name', $model->getDbFields())) {
$model->user_name = get_user_name();
}
//保存当前数据对象
$list = $model->add();
if ($list !== false) {
//保存成功
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//失败提示
$this->error('编辑失败!');
}
}
示例2: mark
function mark()
{
$action = $_REQUEST['action'];
$id = $_REQUEST["id"];
$val = $_REQUEST["val"];
if (!empty($id)) {
switch ($action) {
case 'del':
$result = $this->_destory($id, true);
if ($result) {
$this->ajaxReturn('', "删除成功", 1);
} else {
$this->ajaxReturn('', "删除失败", 0);
}
break;
case 'move_folder':
$field = 'group';
$result = $this->_set_field($id, $field, $val);
if ($result !== false) {
$this->assign('jumpUrl', get_return_url());
$this->success('操作成功!');
} else {
//失败提示
$this->error('操作失败!');
}
}
}
}
示例3: _update
protected function _update()
{
$model = D("UserFolder");
if (false === $model->create()) {
$this->error($model->getError());
}
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例4: import
public function import()
{
$save_path = get_save_path();
$opmode = $_POST["opmode"];
if ($opmode == "import") {
import("@.ORG.Util.UploadFile");
$upload = new UploadFile();
$upload->savePath = $save_path;
$upload->allowExts = array('xlsx', 'xls');
$upload->saveRule = uniqid;
$upload->autoSub = false;
if (!$upload->upload()) {
$this->error($upload->getErrorMsg());
} else {
//取得成功上传的文件信息
$uploadList = $upload->getUploadFileInfo();
Vendor('Excel.PHPExcel');
//导入thinkphp第三方类库
$inputFileName = $save_path . $uploadList[0]["savename"];
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
// dump(count($sheetData));
// exit;
$model = M(MODULE_NAME);
//dump($sheetData);
for ($i = $this->first_row; $i <= count($sheetData); $i++) {
$data = array();
$data['emp_no'] = $sheetData[$i]["A"];
// $data['B']=PHPExcel_Shared_Date::ExcelToPHP($sheetData[$i]["B"]);
$data['B'] = $sheetData[$i]["B"];
for ($k = 67; $k <= 67 + $this->field_count; $k++) {
$data[chr($k)] = $sheetData[$i][chr($k)];
}
$model->add($data);
}
//dump($sheetData);
if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/" . $inputFileName)) {
unlink($_SERVER["DOCUMENT_ROOT"] . "/" . $inputFileName);
}
$this->assign('jumpUrl', get_return_url());
$this->success('导入成功!');
}
} else {
$this->display();
}
}
示例5: save
function save()
{
$model = D("User");
if (false === $model->create()) {
$this->error($model->getError());
}
session('user_pic', $model->pic);
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例6: _update
protected function _update($name = CONTROLLER_NAME)
{
$id = I("id");
$model = D($name);
$model->where("id={$id}")->delete();
if (false === $model->create()) {
$this->error($model->getError());
}
//保存当前数据对象
$model->user_id = get_user_id();
$list = $model->add();
if ($list !== false) {
//保存成功
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//失败提示
$this->error('编辑失败!');
}
}
示例7: _update
function _update()
{
//B('FilterString');
$model = M('UserConfig');
if (false === $model->create()) {
$this->error($model->getError());
}
$model->push_web = implode(",", $model->push_web);
$model->push_wechat = implode(",", $model->push_wechat);
$model->id = get_user_id();
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例8: _update
function _update()
{
//B('FilterString');
$model = M('UserConfig');
if (false === $model->create()) {
$this->error($model->getError());
}
if (in_array('id', $model->getDbFields())) {
$model->id = get_user_id();
}
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例9: _update
protected function _update()
{
$name = $this->getActionName();
$model = D($name);
// dump($model -> create());exit;
if (false === ($data = $model->create())) {
$this->error($model->getError() + "123123");
}
if (!I("post.is_free")) {
$data["is_free"] = '';
}
$list = $model->save($data);
if (false !== $list) {
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
//成功提示
} else {
$this->error('编辑失败!');
//错误提示
}
}
示例10: _update
protected function _update()
{
$model = M('MailAccount');
if (false === $model->create()) {
$this->error($model->getError());
}
if (in_array('id', $model->getDbFields())) {
$model->id = get_user_id();
}
// 更新数据
$email = $_POST['email'];
$list = $model->save();
if (false !== $list) {
//成功提示
$this->_set_email($email);
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例11: _update
protected function _update()
{
$id = $_POST['id'];
$model = D("Node");
if (false === $model->create()) {
$this->error($model->getError());
}
if (strpos($model->url, '##') !== false) {
$model->sub_folder = ucfirst(get_module(str_replace("##", "", $model->url))) . "Folder";
} else {
$model->sub_folder = '';
}
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例12: _update
protected function _update()
{
$ajax = $_POST['ajax'];
$id = $_POST['id'];
$model = D("Contact");
if (false === $model->create()) {
$this->error($model->getError());
}
$model->__set('letter', get_letter($model->__get('name')));
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例13: mark
public function mark()
{
$action = $_REQUEST['action'];
$id = $_REQUEST['id'];
switch ($action) {
case 'del':
$field = 'folder';
$val = 4;
$result = $this->_set_field($id, $field, $val);
break;
case 'del_forever':
$this->_del($id);
break;
case 'spam':
$field = 'folder';
$val = 5;
$result = $this->_set_field($id, $field, $val);
break;
case 'readed':
$field = 'read';
$val = 1;
$result = $this->_set_field($id, $field, $val);
break;
case 'unread':
$field = 'read';
$val = 0;
$result = $this->_set_field($id, $field, $val);
break;
case 'darft':
$field = 'folder';
$val = 3;
$result = $this->_set_field($id, $field, $val);
break;
case 'move_folder':
$field = 'folder';
$val = $_REQUEST['val'];
$result = $this->_set_field($id, $field, $val);
break;
default:
break;
}
if ($result !== false) {
$this->assign('jumpUrl', get_return_url());
$this->success('操作成功!');
} else {
//失败提示
$this->error('操作失败!');
}
}
示例14: _update
protected function _update()
{
$id = $_POST['id'];
$model = D("Customer");
if (false === $model->create()) {
$this->error($model->getError());
}
$model->letter = get_letter($model->name);
// 更新数据
$list = $model->save();
if (false !== $list) {
//成功提示
$this->assign('jumpUrl', get_return_url());
$this->success('编辑成功!');
} else {
//错误提示
$this->error('编辑失败!');
}
}
示例15: set_duty
public function set_duty()
{
$role_id = $_POST["role_id"];
$duty_list = $_POST["duty_list"];
$model = D("Role");
$model->del_duty($role_id);
$result = $model->set_duty($role_id, $duty_list);
if ($result === false) {
$this->error('操作失败!');
} else {
$this->assign('jumpUrl', get_return_url());
$this->success('操作成功!');
}
}