當前位置: 首頁>>代碼示例>>PHP>>正文


PHP site::default_domain方法代碼示例

本文整理匯總了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()));
 }
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:41,代碼來源:user_show.php

示例2:

    echo $item['id'];
    ?>
"> 刪除</a>&nbsp;
</div>
<div class="span-3 fB">
<?php 
    echo $item['id'];
    ?>
&nbsp;
</div>
	<div class="cell span-5 orderCell"><?php 
    echo $item['title'];
    ?>
&nbsp;</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>&nbsp;</div>
<div class="cell span-3">
<a href="/product/category/doedit_position_up/"><img src="/images/arrow-up.gif" alt="up" border="0"></a>
&nbsp;&nbsp;&nbsp;&nbsp;
<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'];
    ?>
&nbsp;</div>
<div class="cell span-4"><?php 
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:31,代碼來源:doc_template_list.php

示例3: confirm

" type="checkbox" /></td>
                        <td><a href="/site/news/edit/<?php 
        echo $item['id'];
        ?>
">編輯</a>&nbsp;
							<a href="/site/news/delete/<?php 
        echo $item['id'];
        ?>
" onclick="javascript:return confirm('確定刪除?')"> 刪除</a>
                        </td>
                        <td><?php 
        echo $item['id'];
        ?>
&nbsp;</td>
                        <td><a href="<?php 
        echo site::default_domain() . "/news/infor_list/" . $item['id'];
        ?>
" target="_blank"><?php 
        echo $item['title'];
        ?>
</a>&nbsp;</td>
						<td><?php 
        echo $item['comefrom'];
        ?>
</td>
						<td  class="txc"><?php 
        echo $item['click'];
        ?>
</td>
						<td  class="txc"> <?php 
        if (!empty($categorys[$item['classid']])) {
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:31,代碼來源:news_list.php

示例4: confirm

">編輯</a>&nbsp;
                            <a href="/site/doc/delete/<?php 
        echo $item['id'];
        ?>
" onclick="javascript:return confirm('確定刪除?')"> 刪除</a>
                        </td>
                        <td><?php 
        echo $item['id'];
        ?>
&nbsp;</td>
                        <td><?php 
        echo $item['title'];
        ?>
&nbsp;</td>
                        <td><a href="<?php 
        echo site::default_domain() . '/' . $item['permalink'];
        ?>
" target="_black"><?php 
        echo $item['permalink'];
        ?>
</a>&nbsp;</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'];
        ?>
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:31,代碼來源:doc_list.php

示例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="保存">
開發者ID:RenzcPHP,項目名稱:3dproduct,代碼行數:31,代碼來源:css_edit.php


注:本文中的site::default_domain方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。