当前位置: 首页>>代码示例>>PHP>>正文


PHP attach函数代码示例

本文整理汇总了PHP中attach函数的典型用法代码示例。如果您正苦于以下问题:PHP attach函数的具体用法?PHP attach怎么用?PHP attach使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了attach函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     $sort = input("request.sort", 'trim', 'ordid');
     $order = input("request.order", 'trim', 'ASC');
     $tree = new \Common\ORG\Tree();
     $tree->icon = array('│ ', '├─ ', '└─ ');
     $tree->nbsp = '   ';
     $result = $this->_mod->order($sort . ' ' . $order)->select();
     $array = array();
     foreach ($result as $r) {
         $r['str_img'] = $r['img'] ? '<div class="img_border"><img src="' . attach($r['img'], 'article_cate') . '" width="26" height="26" class="J_preview" data-bimg="' . attach($r['img'], 'article_cate') . '"/></div>' : '';
         $r['str_status'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="status" data-value="' . $r['status'] . '" src="__STATIC__/images/admin/toggle_' . ($r['status'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_manage'] = '<a href="javascript:;" class="J_showdialog" data-uri="' . U('article_cate/add', array('pid' => $r['id'])) . '" data-title="' . L('add_article_cate') . '" data-id="add" data-width="500" data-height="360">' . L('add_article_subcate') . '</a> |
                             <a href="javascript:;" class="J_showdialog" data-uri="' . U('article_cate/edit', array('id' => $r['id'])) . '" data-title="' . L('edit') . ' - ' . $r['name'] . '" data-id="edit" data-width="500" data-height="360">' . L('edit') . '</a> |
                             <a href="javascript:;" data-acttype="ajax" class="J_confirmurl" data-uri="' . U('article_cate/delete', array('id' => $r['id'])) . '" data-msg="' . sprintf(L('confirm_delete_one'), $r['name']) . '">' . L('delete') . '</a>';
         $r['parentid_node'] = $r['pid'] ? ' class="child-of-node-' . $r['pid'] . '"' : '';
         $r['cate_type'] = $r['type'] ? '<span class="blue">' . L('article_cate_type_' . $r['type']) . '</span>' : L('article_cate_type_' . $r['type']);
         $array[] = $r;
     }
     $str = "<tr id='node-\$id' \$parentid_node>\n                <td align='center'><input type='checkbox' value='\$id' class='J_checkitem'></td>\n                <td>\$spacer<span data-tdtype='edit' data-field='name' data-id='\$id' class='tdedit'>\$name</span></td>\n                <td align='center'>\$id</td>\n                <td align='center'>\$cate_type</td>\n                <td align='center'>\$str_img</td>\n                <td align='center'><span data-tdtype='edit' data-field='ordid' data-id='\$id' class='tdedit'>\$ordid</span></td>\n\n                <td align='center'>\$str_status</td>\n                <td align='center'>\$str_manage</td>\n                </tr>";
     $tree->init($array);
     $list = $tree->get_tree(0, $str);
     $this->assign('list', $list);
     //bigmenu (标题,地址,弹窗ID,宽,高)
     $big_menu = array('title' => L('add_article_cate'), 'iframe' => U('article_cate/add'), 'id' => 'add', 'width' => '500', 'height' => '360');
     $this->assign('big_menu', $big_menu);
     $this->assign('list_table', true);
     $this->display();
 }
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:29,代码来源:ArticleCateAction.class.php

示例2: cate_url

 public function cate_url()
 {
     $sort = $this->_get("sort", 'trim', 'ordid');
     $order = $this->_get("order", 'trim', 'ASC');
     $tree = new Tree();
     $tree->icon = array('│ ', '├─ ', '└─ ');
     $tree->nbsp = '&nbsp;&nbsp;&nbsp;';
     $result = $this->_mod->order($sort . ' ' . $order)->where("token ='" . session('token') . "'")->select();
     $array = array();
     foreach ($result as $r) {
         $r['str_img'] = $r['img'] ? '<span class="img_border"><img src="' . attach($r['img'], '' . session('token') . '/item_cate') . '" style="width:26px; height:26px;" class="J_preview" data-bimg="' . attach($r['img'], '' . session('token') . '/item_cate') . '" /></span>' : '';
         $r['str_status'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="status" data-value="' . $r['status'] . '" src="__STATIC__/images/admin/toggle_' . ($r['status'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_index'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="is_index" data-value="' . $r['is_index'] . '" src="__STATIC__/images/admin/toggle_' . ($r['is_index'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_type'] = $r['type'] ? '<span class="gray">' . L('item_cate_type_tag') . '</span>' : L('item_cate_type_cat');
         // <a href="'.U('item_cate/tag_list',array('cate_id'=>$r['id'])).'">'.L('tag').'</a> |
         $r['parentid_node'] = $r['pid'] ? ' class="child-of-node-' . $r['pid'] . '"' : '';
         $array[] = $r;
     }
     $url = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php?token=' . session('token') . '&m=book&a=cate&cateid=';
     $str = "<tr id='node-\$id' \$parentid_node>\n                <td align='center' style='display:none;'><input type='checkbox' value='\$id' class='J_checkitem'></td>\n                <td align='left' style='display:none;'>\$id</td>\n                <td>\$spacer<span style='color:\$fcolor'>\$name</span></td>\n                <td align='left'>" . $url . "\$id</td>\n\n                </tr>";
     $tree->init($array);
     $list = $tree->get_tree(0, $str);
     $this->assign('list', $list);
     //bigmenu (标题,地址,弹窗ID,宽,高)
     $this->assign('list_table', true);
     $this->display();
 }
开发者ID:yaks,项目名称:weixinshop,代码行数:27,代码来源:item_cateAction.class.php

示例3: index

 public function index()
 {
     $sort = $this->_get("sort", 'trim', 'ordid');
     $order = $this->_get("order", 'trim', 'ASC');
     $tree = new Tree();
     $tree->icon = array('│ ', '├─ ', '└─ ');
     $tree->nbsp = '&nbsp;&nbsp;&nbsp;';
     $result = $this->_mod->order($sort . ' ' . $order)->where(array('tokenTall' => $this->getTokenTall()))->select();
     $array = array();
     foreach ($result as $r) {
         $r['str_img'] = $r['img'] ? '<span class="img_border"><img src="' . attach($r['img'], 'item_cate') . '" style="width:26px; height:26px;" class="J_preview" data-bimg="' . attach($r['img'], 'item_cate') . '" /></span>' : '';
         $r['str_status'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="status" data-value="' . $r['status'] . '" src="__STATIC__/images/admin/toggle_' . ($r['status'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_index'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="is_index" data-value="' . $r['is_index'] . '" src="__STATIC__/images/admin/toggle_' . ($r['is_index'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_type'] = $r['type'] ? '<span class="gray">' . L('item_cate_type_tag') . '</span>' : L('item_cate_type_cat');
         $r['str_manage'] = '<a href="javascript:;" class="J_showdialog" data-uri="' . U('item_cate/add', array('pid' => $r['id'])) . '" data-title="' . L('add_item_cate') . '" data-id="add" data-width="520" data-height="360">' . L('add_item_subcate') . '</a> |
                             <a href="javascript:;" class="J_showdialog" data-uri="' . U('item_cate/edit', array('id' => $r['id'])) . '" data-title="' . L('edit') . ' - ' . $r['name'] . '" data-id="edit" data-width="520" data-height="360">' . L('edit') . '</a> |
                             <a href="javascript:;" class="J_confirmurl" data-acttype="ajax" data-uri="' . U('item_cate/delete', array('id' => $r['id'])) . '" data-msg="' . sprintf(L('confirm_delete_one'), $r['name']) . '">' . L('delete') . '</a>';
         $r['parentid_node'] = $r['pid'] ? ' class="child-of-node-' . $r['pid'] . '"' : '';
         $r['is_allcate'] = $r['name'] == '全部商品' ? 'allcate' : 'cate&cid=' . $r['id'];
         $array[] = $r;
     }
     $str = "<tr id='node-\$id' \$parentid_node>\n                <td align='center'><input type='checkbox' value='\$id' class='J_checkitem'></td>\n                <td align='center'>\$id</td>\n                <td>\$spacer<span data-tdtype='view' data-field='name' data-id='\$id' class='tdview'  style='color:\$fcolor'>\$name</span></td>\n                <td align='left'>" . $_SERVER['HTTP_HOST'] . "/weTall/index.php?m=book&a=\$is_allcate&tokenTall=" . $this->getTokenTall() . "</td>\n        \t\t<td align='center'>\$str_img</td>\n                <td align='center'>\$str_type</td>\n                <td align='center'><span data-tdtype='view' data-field='ordid' data-id='\$id' class='tdview'>\$ordid</span></td>\n                <td align='center'>\$str_index</td>\n                <td align='center'>\$str_status</td>\n                <td align='center'>\$str_manage</td>\n                </tr>";
     $tree->init($array);
     $list = $tree->get_tree(0, $str);
     $this->assign('list', $list);
     //bigmenu (标题,地址,弹窗ID,宽,高)
     $big_menu = array('title' => L('add_item_cate'), 'iframe' => U('item_cate/add'), 'id' => 'add', 'width' => '520', 'height' => '360');
     $this->assign('big_menu', $big_menu);
     $this->assign('list_table', true);
     $this->display();
 }
开发者ID:dlpc,项目名称:wxshoppingmall,代码行数:31,代码来源:item_cateAction.class.php

示例4: _before_drop

 public function _before_drop($ids)
 {
     foreach ($ids as $val) {
         if ($info = M(MODULE_NAME)->where(array('id' => $val))->find()) {
             @unlink(attach($info['img'], MODULE_NAME, true));
         }
     }
 }
开发者ID:kid2682,项目名称:SMZDM,代码行数:8,代码来源:mallAction.class.php

示例5: parse

 function parse($info)
 {
     foreach ($this->attach_fields as $val) {
         if (array_key_exists($val, $info)) {
             $info['_' . $val] = attach($info[$val], $this->name, true);
         }
     }
     foreach ($this->editor_fields as $val) {
         if (array_key_exists($val, $info)) {
             $info[$val] = parse_editor_info($info[$val]);
         }
     }
     return $info;
 }
开发者ID:hello7921,项目名称:haorizi,代码行数:14,代码来源:BaseModel.class.php

示例6: index

 public function index()
 {
     $sort = $this->_get("sort", 'trim', 'ordid');
     $order = $this->_get("order", 'trim', 'ASC');
     $tree = new Tree();
     $tree->icon = array('│ ', '├─ ', '└─ ');
     $tree->nbsp = '&nbsp;&nbsp;&nbsp;';
     $result = M('item_cate')->order($sort . ' ' . $order)->select();
     $map = array();
     $UserDB = D('item_cate');
     $count = $UserDB->where($map)->count();
     $Page = new Page($count, 1808);
     // 实例化分页类 传入总记录数
     // 进行分页数据查询 注意page方法的参数的前面部分是当前的页数使用 $_GET[p]获取
     $nowPage = isset($_GET['p']) ? $_GET['p'] : 1;
     $show = $Page->show();
     // 分页显示输出
     $result = $UserDB->where($map)->order('ordid ASC')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     $this->assign('page', $show);
     // 赋值分页输出
     //var_dump($result);die();
     $array = array();
     foreach ($result as $r) {
         $r['str_img'] = $r['img'] ? '<span class="img_border"><img src="' . attach($r['img'], 'item_cate') . '" style="width:26px; height:26px;" class="J_preview" data-bimg="' . attach($r['img'], 'item_cate') . '" /></span>' : '';
         $r['str_status'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="status" data-value="' . $r['status'] . '" src="__ROOT__/weTall/static/images/admin/toggle_' . ($r['status'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_index'] = '<img data-tdtype="toggle" data-id="' . $r['id'] . '" data-field="is_index" data-value="' . $r['is_index'] . '" src="__ROOT__/weTall/static/images/admin/toggle_' . ($r['is_index'] == 0 ? 'disabled' : 'enabled') . '.gif" />';
         $r['str_type'] = $r['type'] ? '<span class="gray">标签分类</span>' : "商品分类";
         $r['str_manage'] = '<a href="javascript:;" class="J_showdialog" data-uri="/weTall/index.php?g=Admin&m=item_cate&a=add&pid=' . $r['id'] . '" data-title="添加子分类" data-id="add" data-width="520" data-height="360">' . "添加子分类" . '</a> |
                         
                             <a href="javascript:;" class="J_showdialog" data-uri="/weTall/index.php?g=Admin&m=item_cate&a=edit&id=' . $r['id'] . '" data-title="编辑 - ' . $r['name'] . '" data-id="edit" data-width="520" data-height="360">' . "编辑" . '</a> |
                             <a href="javascript:;" class="J_confirmurl" data-acttype="ajax" data-uri="/weTall/index.php?g=Admin&m=item_cate&a=delete&id=' . $r['id'] . '" data-msg="' . sprintf("确定删除吗?", $r['name']) . '">' . "删除" . '</a>';
         // <a href="'.U('item_cate/tag_list',array('cate_id'=>$r['id'])).'">'.L('tag').'</a> |
         $r['parentid_node'] = $r['pid'] ? ' class="child-of-node-' . $r['pid'] . '"' : '';
         $array[] = $r;
     }
     // var_dump($array);die();
     $str = "<tr id='node-\$id' \$parentid_node>\r\n                <td align='center'><input type='checkbox' value='\$id' class='J_checkitem'></td>\r\n                <td align='center'>\$id</td>\r\n                <td>\$spacer<span data-tdtype='edit' data-field='name' data-id='\$id' class='tdedit'  style='color:\$fcolor'>\$name</span></td>\r\n                <td align='center'>\$str_img</td>\r\n                <td align='center'>\$str_type</td>\r\n                <td align='center'><span data-tdtype='edit' data-field='ordid' data-id='\$id' class='tdedit'>\$ordid</span></td>\r\n                <td align='center'>\$str_index</td>\r\n                <td align='center'>\$str_status</td>\r\n                <td align='center'>\$str_manage</td>\r\n                </tr>";
     //$this->show($str);
     $tree->init($array);
     $list = $tree->get_tree(0, $str);
     $this->assign('list', $list);
     //bigmenu (标题,地址,弹窗ID,宽,高)
     $big_menu = array('title' => L('add_item_cate'), 'iframe' => U('item_cate/add'), 'id' => 'add', 'width' => '520', 'height' => '360');
     $this->assign('big_menu', $big_menu);
     $this->assign('list_table', true);
     $this->display();
 }
开发者ID:dlpc,项目名称:wxshoppingmall,代码行数:47,代码来源:TallAction.class.php

示例7: L

?>
 :</th>
            <td>
                <input type="text" name="img" id="J_img" class="input-text fl mr10" size="30" value="<?php 
echo $info["img"];
?>
">
                <div id="J_upload_img" class="upload_btn"><span><?php 
echo L('upload');
?>
</span></div>
                <?php 
if (!empty($info['img'])) {
    ?>
<span class="attachment_icon J_attachment_icon" file-type="image" file-rel="<?php 
    echo attach($info['img'], 'item_cate');
    ?>
"><img src="/Public/images/filetype/image_s.gif" /></span><?php 
}
?>
</td>
        </tr>
        <tr>
            <th><?php 
echo L('item_cate_type');
?>
 :</th>
            <td>
                <label><input type="radio" name="type" value="0" <?php 
if ($info["type"] == 0) {
    ?>
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:31,代码来源:d823750835e25a642027dd320fa40890.php

示例8: foreach

    $__LIST__ = $img_list;
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $val) {
            $mod = $i % 2;
            ++$i;
            ?>
<li class="album_<?php 
            echo $val['id'];
            ?>
"><a href="javascript:void(0)" onclick="del_album(<?php 
            echo $val['id'];
            ?>
);"><img src="__STATIC__/css/admin/bgimg/tv-collapsable.gif" /></a><a><img src="<?php 
            echo attach(get_thumb($val['url'], '_b'), 'item');
            ?>
" style="width:80px;height:60px; border:solid 1px #000; "/></a></li><?php 
        }
    }
} else {
    echo "";
}
?>
</ul><div class="cb"></div><table width="100%" cellpadding="2" cellspacing="1" class="table_form" id="first_upload_file"><tbody class="uplode_file"><tr><th width="100" align="left"><a href="javascript:void(0);" class="blue" onclick="add_file();"><img src="__STATIC__/css/admin/bgimg/tv-expandable.gif" /></a>上传文件 :</th><td><input type="file" name="imgs[]"></td></tr></tbody></table></div><div class="content_list pad_10 hidden"><table width="100%" cellpadding="2" cellspacing="1" class="table_form"><tr><th width="120"><?php 
echo L('seo_title');
?>
 :</th><td><input type="text" name="seo_title" class="input-text" size="60" value="<?php 
echo $info["seo_title"];
?>
"></td></tr><tr><th><?php 
开发者ID:weixiang,项目名称:wxshop,代码行数:31,代码来源:55d2bea004a784b09808ae401cfe459f.php

示例9: foreach

        $__LIST__ = $item;
        if (count($__LIST__) == 0) {
            echo "";
        } else {
            foreach ($__LIST__ as $key => $vo) {
                $mod = $i % 2;
                ++$i;
                ?>
<li id="cart_item_<?php 
                echo $vo["id"];
                ?>
"><p class="goods_info"><span class="img"><a href="<?php 
                echo U('item/index', array('id' => $vo['id']));
                ?>
" ><img src="<?php 
                echo attach(get_thumb($vo['img'], '_m'), $_SESSION['user_token'] . '/item');
                ?>
" height="80" width="80"></a></span><span class="tit"><a href="<?php 
                echo U('item/index', array('id' => $vo['id']));
                ?>
" ><?php 
                echo $vo["name"];
                echo $vo["spec_1"];
                echo $vo["spec_2"];
                ?>
</a><br><span>价格:</span><span class="price1">¥<?php 
                echo $vo["price"];
                ?>
</span><br><span>数量:</span><input type ="hidden" id="spec_id_<?php 
                echo $vo["id"];
                ?>
开发者ID:yaks,项目名称:weixinshop,代码行数:31,代码来源:410facb107d20a57943f71d35e7d682e.php

示例10: news

     news($con, $token);
 } else {
     if ($ask == "tidinfo") {
         tidinfo($con, $bid, $tid);
     } else {
         if ($ask == "recentpost") {
             recentpost($con, $view);
         } else {
             if ($ask == "recentreply") {
                 recentreply($con, $view);
             } else {
                 if ($ask == "rights") {
                     rights($con, $bid, $token);
                 } else {
                     if ($ask == "attach") {
                         attach($con, $token, $path, $filename, $price, $auth);
                     } else {
                         if ($ask == "attachdl") {
                             attachdl($con, $token, $id);
                         } else {
                             if ($ask == "attachinfo") {
                                 attachinfo($con, $id, $token);
                             } else {
                                 if ($ask == "unusedattachinfo") {
                                     unusedattachinfo($con, $token);
                                 } else {
                                     if ($ask == "delattach") {
                                         delattach($con, $token, $id);
                                     } else {
                                         if ($ask == "editpreview") {
                                             editpreview($con, $token, $bid, $tid, $pid);
开发者ID:hun-tun,项目名称:CAPUBBS,代码行数:31,代码来源:jiekouapi.php

示例11: if

<?php if (!defined('THINK_PATH')) exit();?><!--编辑栏目--><div class="dialog_content"><form id="info_form" action="<?php echo u('item_cate/edit');?>" method="post"><table width="100%" class="table_form"><tr><th width="100"><?php echo L('item_cate_parent');?> :</th><td><select class="J_cate_select mr10" data-pid="0" data-uri="<?php echo U('item_cate/ajax_getchilds');?>" data-selected="<?php echo ($info["spid"]); ?>"></select><input type="hidden" name="pid" id="J_cate_id" /></td></tr><tr><th><?php echo L('item_cate_name');?> :</th><td><input type="text" name="name" id="J_name" class="input-text" value="<?php echo ($info["name"]); ?>" style="color:<?php echo ($info["fcolor"]); ?>" size="30"><input type="hidden" value="" name="fcolor" id="J_color"><a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_name" data-ic="J_color" src="__STATIC__/images/color.png"></a></td></tr><tr><th><?php echo L('item_cate_img');?> :</th><td><input type="text" name="img" id="J_img" class="input-text fl mr10" size="30" value="<?php echo ($info["img"]); ?>"><div id="J_upload_img" class="upload_btn"><span><?php echo L('upload');?></span></div><?php if(!empty($info['img'])): ?><span class="attachment_icon J_attachment_icon" file-type="image" file-rel="<?php echo attach($info['img'], 'item_cate');?>"><img src="__STATIC__/images/filetype/image_s.gif" /></span><?php endif; ?></td></tr><tr><th><?php echo L('item_cate_type');?> :</th><td><label><input type="radio" name="type" value="0" <?php if($info["type"] == 0): ?>checked<?php endif; ?>><?php echo L('item_cate_type_cat');?></label>&nbsp;&nbsp;
              <!--  <label><input type="radio" name="type" value="1" <?php if($info["type"] == 1): ?>checked<?php endif; ?>><?php echo L('item_cate_type_tag');?></label>--></td></tr><tr><th>首页显示 :</th><td><label><input type="radio" name="is_index" value="0" <?php if($info["is_index"] == 0): ?>checked<?php endif; ?>> 不显示</label>&nbsp;&nbsp;
                <label><input type="radio" name="is_index" value="1" <?php if($info["is_index"] == 1): ?>checked<?php endif; ?>> 显示</label></td></tr><tr><th>审核状态 :</th><td><label><input type="radio" name="status" value="0" <?php if($info["status"] == 0): ?>checked<?php endif; ?>> 未审核</label>&nbsp;&nbsp;
				<label><input type="radio" name="status" value="1" <?php if($info["status"] == 1): ?>checked<?php endif; ?>> 已审核</label></td></tr><!--	<tr><th><?php echo L('seo_title');?> :</th><td><input type="text" name="seo_title" class="input-text" value="<?php echo ($info["seo_title"]); ?>" style="width:300px;"></td></tr><tr><th><?php echo L('seo_keys');?> :</th><td><input type="text" name="seo_keys" class="input-text" value="<?php echo ($info["seo_keys"]); ?>" style="width:300px;"></td></tr><tr><th><?php echo L('seo_desc');?> :</th><td><textarea name="seo_desc" style="width:295px; height:50px;"><?php echo ($info["seo_desc"]); ?></textarea></td></tr>--></table><input type="hidden" name="id" value="<?php echo ($info["id"]); ?>" /></form></div><script src="__STATIC__/js/jquery/plugins/colorpicker.js"></script><script src="__STATIC__/js/fileuploader.js"></script><script>var check_name_url = "<?php echo U('item_cate/ajax_check_name', array('id'=>$info['id']));?>";
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#J_name").formValidator({onshow:lang.please_input+lang.item_cate_name,onfocus:lang.please_input+lang.item_cate_name}).inputValidator({min:1,onerror:lang.please_input+lang.item_cate_name}).defaultPassed();
	
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
            $.pinphp.tip({content:result.msg});
            window.location.reload();
		} else {
			$.pinphp.tip({content:result.msg, icon:'alert'});
		}
	}
	$('.J_cate_select').cate_select();
	
	//颜色选择器
	$('.J_color_picker').colorpicker();
	
	//上传图片
    var uploader = new qq.FileUploaderBasic({
    	allowedExtensions: ['jpg','gif','jpeg','png','bmp','pdg'],
        button: document.getElementById('J_upload_img'),
        multiple: false,
        action: "<?php echo U('item_cate/ajax_upload_img');?>",
        inputName: 'img',
开发者ID:royalwang,项目名称:saivi,代码行数:30,代码来源:b0316b46bd741ec331e3352818c61573.php

示例12: imageUploader

 private function imageUploader($attr)
 {
     $s = '';
     if (!defined('TAG_INIT_IMAGE')) {
         $s = '
             <script type="text/javascript">
                 function showImageDialog(elm, opts) {
                     require(["util"], function(util){
                         var btn = $(elm);
                         var ipt = btn.parent().prev();
                         var val = ipt.val();
                         var img = ipt.parent().next().children();
                         util.image(val, function(url){
                             img.get(0).src = url.url;
                             ipt.val(url.filename);
                         }, opts);
                     });
                 }
             </script>';
         define('TAG_INIT_IMAGE', true);
     }
     if (empty($attr['default'])) {
         $attr['default'] = __SITE__ . 'w/static/img/no-image.jpg';
     }
     $options = array();
     $options['width'] = $attr['width'];
     if (empty($options['width'])) {
         $options['width'] = 800;
     }
     if (empty($attr['title'])) {
         $attr['title'] = '选择图片';
     }
     $s .= '
         <div class="input-group">
             <input type="text" name="' . $attr['name'] . '" value="' . $attr['value'] . '" class="form-control" autocomplete="off">
             <span class="input-group-btn">
                 <button class="btn btn-default" type="button" onclick="showImageDialog(this, \'' . base64_encode(serialize($options)) . '\');">' . $attr['title'] . '</button>
             </span>
         </div>
         <div class="input-group" style="margin-top:.5em;">
             <img src="' . attach($attr['value']) . '" onerror="this.src=\'' . $attr['default'] . '\'; this.title=\'图片未找到.\'" class="img-responsive img-thumbnail" width="150" />
         </div>';
     return $s;
 }
开发者ID:devsnippet,项目名称:microbuilder,代码行数:44,代码来源:Tags.class.php

示例13: sendOvay

	function sendOvay () {
		global $_subject, $_from, $_headers, $_type, $_to;
		$mime = "";
		// parametres optionnels
		if (!empty($_from)) $mime .= "From: ".$_from. "\n";
		if (!empty($_headers)) $mime .= $_headers. "\n";
		if (!empty($_body)) attach($_body, "", $_type);
		// entete MIME
		$mime .= "MIME-Version: 1.0\n" . build_multipart();
		// envoi du message
		return mail($_to, $_subject, "", $mime);
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:12,代码来源:cron3.php

示例14: attach

                echo $val["id"];
                ?>
"></td>
                <td align="center"><?php 
                echo $val["id"];
                ?>
</td>
                <td align="right">
                    <?php 
                if (!empty($val['img'])) {
                    ?>
<div class="img_border"><img src="<?php 
                    echo attach(get_thumb($val['img'], '_s'), 'item');
                    ?>
" width="32" width="32" class="J_preview" data-bimg="<?php 
                    echo attach($val['img'], 'item');
                    ?>
"></div><?php 
                }
                ?>
                </td>
                <td align="left"><span data-tdtype="edit" data-field="title" data-id="<?php 
                echo $val["id"];
                ?>
" class="tdedit" style="color:<?php 
                echo $val["colors"];
                ?>
;"><?php 
                echo $val["title"];
                ?>
</span></td>
开发者ID:norain2050,项目名称:shiliugang,代码行数:31,代码来源:516bbd045f439ffebe44cea6bc4abf84.php

示例15: foreach

                    </thead>
                    <tbody>
                     <?php 
if (is_array($order_detail)) {
    $i = 0;
    $__LIST__ = $order_detail;
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $vo) {
            $mod = $i % 2;
            ++$i;
            ?>
<tr class="">
                            <td><img width="68" alt="nopic" src="<?php 
            echo attach(get_thumb($vo['img'], '_b'), session('token') . '/item');
            ?>
"></td>
                            <td class="ltd">
                                <?php 
            echo $vo["title"];
            ?>
 <?php 
            echo $vo["spec_1"];
            ?>
 <?php 
            echo $vo["spec_2"];
            ?>
 
                                
                            </td>
开发者ID:yaks,项目名称:weixinshop,代码行数:31,代码来源:19469ba7b1c7a28a865c26bdd4918782.php


注:本文中的attach函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。