本文整理汇总了PHP中site::default_domain方法的典型用法代码示例。如果您正苦于以下问题:PHP site::default_domain方法的具体用法?PHP site::default_domain怎么用?PHP site::default_domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类site
的用法示例。
在下文中一共展示了site::default_domain方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* 修改信息
*/
function edit()
{
role::check('user_show');
$return_struct = array('status' => 0, 'code' => 501, 'msg' => 'Not Implemented');
$id = intval($this->input->get('id'));
if (!$id) {
remind::set(Kohana::lang('o_global.illegal_data'), 'user/user_show');
}
$db = Database::instance();
$data = array_shift($db->query('SELECT * FROM user_show WHERE id=' . $id)->result_array(false));
if (!$data['id']) {
remind::set(Kohana::lang('o_global.illegal_data'), 'user/user_show');
}
if ($_POST) {
$status = (int) $_POST['status'];
$sql = "UPDATE user_show SET status='" . $status . "' ";
if ((int) $data['get_money'] == 0 && !empty($_POST['get_money']) && (int) $_POST['get_money'] > 0) {
$money = (int) $_POST['get_money'];
$sql .= ", get_money = " . $money;
//奖励用户
$db->query("UPDATE users SET user_money = user_money + {$money} WHERE id='" . $data['user_id'] . "' ");
//奖励记录
$sql_reward = "INSERT INTO user_reward \r\n SET user_id='" . $data['user_id'] . "',\r\n reward_money= '{$money}',\r\n memo= '晒宝奖励',\r\n reward_type='reward'\r\n ";
$db->query($sql_reward);
}
$db->query($sql . " WHERE id='" . $id . "' ");
remind::set(Kohana::lang('o_global.update_success'), 'user/user_show', 'success');
}
//用户
if ($data['user_id'] > 0) {
$data['user'] = array_shift($db->query('SELECT lastname FROM users WHERE id=' . $data['user_id'])->result_array(false));
}
//图片
if ($data['image_ids']) {
$data['images'] = $db->query('SELECT * FROM user_upload_image WHERE status!=1 AND id in (' . $data['image_ids'] . ')')->result_array(false);
}
$this->template->content = new View("user/user_show_edit", array('data' => $data, 'front_domain' => site::default_domain()));
}
示例2:
echo $item['id'];
?>
"> 删除</a>
</div>
<div class="span-3 fB">
<?php
echo $item['id'];
?>
</div>
<div class="cell span-5 orderCell"><?php
echo $item['title'];
?>
</div>
<div class="cell span-6"><a href="<?php
echo site::default_domain($item['site_id']) . '/' . $item['permalink'];
?>
" target="_black"><?php
echo $item['permalink'];
?>
</a> </div>
<div class="cell span-3">
<a href="/product/category/doedit_position_up/"><img src="/images/arrow-up.gif" alt="up" border="0"></a>
<a href="/product/category/doedit_position_down/"><img src="/images/arrow-down.gif" alt="down" border="0"></a>
</div>
<div class="cell span-4"><?php
echo $item['created'];
?>
</div>
<div class="cell span-4"><?php
示例3: confirm
" type="checkbox" /></td>
<td><a href="/site/news/edit/<?php
echo $item['id'];
?>
">编辑</a>
<a href="/site/news/delete/<?php
echo $item['id'];
?>
" onclick="javascript:return confirm('确定删除?')"> 删除</a>
</td>
<td><?php
echo $item['id'];
?>
</td>
<td><a href="<?php
echo site::default_domain() . "/news/infor_list/" . $item['id'];
?>
" target="_blank"><?php
echo $item['title'];
?>
</a> </td>
<td><?php
echo $item['comefrom'];
?>
</td>
<td class="txc"><?php
echo $item['click'];
?>
</td>
<td class="txc"> <?php
if (!empty($categorys[$item['classid']])) {
示例4: confirm
">编辑</a>
<a href="/site/doc/delete/<?php
echo $item['id'];
?>
" onclick="javascript:return confirm('确定删除?')"> 删除</a>
</td>
<td><?php
echo $item['id'];
?>
</td>
<td><?php
echo $item['title'];
?>
</td>
<td><a href="<?php
echo site::default_domain() . '/' . $item['permalink'];
?>
" target="_black"><?php
echo $item['permalink'];
?>
</a> </td>
<td>
<div class="new_float_parent">
<input type="text" class="text" size="4" name="position" value="<?php
echo $item['order'];
?>
" />
<div class="new_float">
<input type="text" class="text" size="4" name="order" value="<?php
echo $item['order'];
?>
示例5:
<td>
<textarea name="css" id="css" cols="75" rows="20" class="text _x_ipt t400" type="textarea" maxth="255" ><?php
echo $css;
?>
</textarea>
</td>
</tr>
<tr>
<th>站点:</th>
<td>
<a href="<?php
echo site::default_domain($site_id);
?>
"><?php
echo site::default_domain($site_id);
?>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_eidt">
<table width="445" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="152"></th>
<td width="293">
<input name="Input" type="submit" class="ui-button" value="保存">