本文整理匯總了PHP中themeImagePath函數的典型用法代碼示例。如果您正苦於以下問題:PHP themeImagePath函數的具體用法?PHP themeImagePath怎麽用?PHP themeImagePath使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了themeImagePath函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: del_replyOp
/**
* 刪除回複
*/
public function del_replyOp()
{
// 驗證回複
$this->checkReplySelf();
$model = Model();
// 刪除商品
$goods_list = $model->table('circle_thg')->where(array('theme_id' => $this->t_id, 'reply_id' => $this->r_id))->delete();
// 刪除附件
$where = array();
$where['affix_type'] = 2;
$where['member_id'] = $_SESSION['member_id'];
$where['theme_id'] = $this->t_id;
$where['reply_id'] = $this->r_id;
$affix_list = $model->table('circle_affix')->where($where)->select();
if ($affix_list) {
foreach ($affix_list as $val) {
@unlink(themeImagePath($val['affix_filename']));
@unlink(themeImagePath($val['affix_filethumb']));
}
$model->table('circle_affix')->where($where)->delete();
}
// The recycle bin add delete records
$param = array();
$param['theme_id'] = $this->t_id;
$param['reply_id'] = $this->r_id;
$param['op_id'] = $_SESSION['member_id'];
$param['op_name'] = $_SESSION['member_name'];
$param['type'] = 'reply';
Model('circle_recycle')->saveRecycle($param);
// 刪除回複
$model->table('circle_threply')->where(array('theme_id' => $this->t_id, 'reply_id' => $this->r_id, 'member_id' => $_SESSION['member_id']))->delete();
// Experience
if (intval($this->reply_info['reply_exp']) > 0) {
$param = array();
$param['member_id'] = $_SESSION['member_id'];
$param['member_name'] = $_SESSION['member_name'];
$param['circle_id'] = $this->c_id;
$param['itemid'] = $this->t_id . ',' . $this->r_id;
$param['type'] = 'delReplied';
$param['exp'] = $this->reply_info['reply_exp'];
Model('circle_exp')->saveExp($param);
}
showDialog(L('nc_common_op_succ'), 'reload', 'succ');
}
示例2: del_replyOp
/**
* 刪除回複
*/
public function del_replyOp()
{
// 身份驗證
$rs = $this->checkIdentity('cm');
if (!empty($rs)) {
showMessage($rs);
}
$t_id = intval($_GET['t_id']);
$r_id = intval($_GET['r_id']);
// 驗證回複
$model = Model();
$where = array();
$where['theme_id'] = $t_id;
$where['reply_id'] = $r_id;
$where['circle_id'] = $this->c_id;
$reply_info = $model->table('circle_threply')->where($where)->find();
if (empty($reply_info)) {
showDialog(L('circle_reply_not_exists'), 'reload');
}
// 刪除附件
$affix_list = $model->table('circle_affix')->where(array('affix_type' => 2, 'theme_id' => $t_id, 'reply_id' => $r_id))->select();
if (!empty($affix_list)) {
foreach ($affix_list as $val) {
@unlink(themeImagePath($val['affix_filename']));
@unlink(themeImagePath($val['affix_filethumb']));
}
$model->table('circle_affix')->where(array('affix_type' => 2, 'theme_id' => $t_id, 'reply_id' => $r_id))->delete();
}
// 刪除商品
$model->table('circle_thg')->where(array('theme_id' => $t_id, 'reply_id' => $r_id))->delete();
// The recycle bin add delete records
$param = array();
$param['theme_id'] = $t_id;
$param['reply_id'] = $r_id;
$param['op_id'] = $_SESSION['member_id'];
$param['op_name'] = $_SESSION['member_name'];
$param['type'] = 'reply';
Model('circle_recycle')->saveRecycle($param);
// 刪除回複
$rs = $model->table('circle_threply')->where(array('theme_id' => $t_id, 'reply_id' => $r_id))->delete();
// 更新話題回複數
$model->table('circle_theme')->update(array('theme_id' => $t_id, 'theme_commentcount' => array('exp', 'theme_commentcount-1')));
// Experience
if (intval($reply_info['reply_exp']) > 0) {
$param = array();
$param['member_id'] = $reply_info['member_id'];
$param['member_name'] = $reply_info['member_name'];
$param['circle_id'] = $this->c_id;
$param['itemid'] = $t_id . ',' . $r_id;
$param['type'] = 'delReplied';
$param['exp'] = $reply_info['reply_exp'];
Model('circle_exp')->saveExp($param);
}
showDialog(L('nc_common_op_succ'), 'reload', 'succ');
}
示例3: theme_replydelOp
/**
* 話題回複刪除
*/
public function theme_replydelOp()
{
$t_id = intval($_GET['t_id']);
$r_id = intval($_GET['r_id']);
$model = Model();
// 驗證回複
$reply_info = $model->table('circle_threply')->where(array('theme_id' => $t_id, 'reply_id' => $r_id))->find();
if (empty($reply_info)) {
showMessage(L('param_error'));
}
// 刪除附件
$affix_list = $model->table('circle_affix')->where(array('affix_type' => 2, 'theme_id' => $t_id, 'reply_id' => $r_id))->select();
if (!empty($affix_list)) {
foreach ($affix_list as $val) {
@unlink(themeImagePath($val['affix_filename']));
@unlink(themeImagePath($val['affix_filethumb']));
}
$model->table('circle_affix')->where(array('affix_type' => 2, 'theme_id' => $t_id, 'reply_id' => $r_id))->delete();
}
// 刪除商品
$model->table('circle_thg')->where(array('theme_id' => $t_id, 'reply_id' => $r_id))->delete();
// The recycle bin add delete records
$param = array();
$param['theme_id'] = $t_id;
$param['reply_id'] = $r_id;
$param['op_id'] = 0;
$param['op_name'] = L('cirlce_administrator');
$param['type'] = 'adminreply';
Model('circle_recycle')->saveRecycle($param, $reply_info);
// 刪除回複
$model->table('circle_threply')->where(array('theme_id' => $t_id, 'reply_id' => $r_id))->delete();
// 更新話題回複數
$model->table('circle_theme')->update(array('theme_id' => $t_id, 'theme_commentcount' => array('exp', 'theme_commentcount-1')));
// Experience
if (intval($reply_info['reply_exp']) > 0) {
$param = array();
$param['member_id'] = $reply_info['member_id'];
$param['member_name'] = $reply_info['member_name'];
$param['circle_id'] = $reply_info['circle_id'];
$param['itemid'] = $t_id . ',' . $r_id;
$param['type'] = 'delReplied';
$param['exp'] = $reply_info['reply_exp'];
Model('circle_exp')->saveExp($param);
}
showMessage(L('nc_common_op_succ'));
}
示例4: circle_delOp
/**
* 刪除圈子
*/
public function circle_delOp()
{
$id = intval($_GET['c_id']);
if ($id <= 0) {
showMessage(L('param_error'));
}
$model = Model();
$circle_info = $model->table('circle')->find($id);
if (!empty($circle_info)) {
@unlink(BASE_UPLOAD_PATH . DS . ATTACH_CIRCLE . '/group/' . $circle_info['circle_id'] . '.jpg');
}
// 刪除附件
$affix_list = $model->table('circle_affix')->where(array('circle_id' => $id))->select();
if (!empty($affix_list)) {
foreach ($affix_list as $val) {
@unlink(themeImagePath($val['affix_filename']));
@unlink(themeImagePath($val['affix_filethumb']));
}
$model->table('circle_affix')->where(array('circle_id' => $id))->delete();
}
// 刪除商品
$model->table('circle_thg')->where(array('circle_id' => $id))->delete();
// 刪除讚表相關
$model->table('circle_like')->where(array('circle_id' => $id))->delete();
// 刪除回複
$model->table('circle_threply')->where(array('circle_id' => $id))->delete();
// 刪除話題
$model->table('circle_theme')->where(array('circle_id' => $id))->delete();
// 刪除成員
$model->table('circle_member')->where(array('circle_id' => $id))->delete();
// 刪除圈子
$model->table('circle')->delete($id);
$this->log(L('nc_del_circle') . '[' . $id . ']');
showMessage(L('nc_common_op_succ'));
}