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


PHP create_html_editor函数代码示例

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


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

示例1: foreach

         foreach ($img_list as $key => $gallery_img) {
             $gallery_img[$key]['img_url'] = get_image_path($gallery_img['goods_id'], $gallery_img['img_original'], false, 'gallery');
             $gallery_img[$key]['thumb_url'] = get_image_path($gallery_img['goods_id'], $gallery_img['img_original'], true, 'gallery');
         }
     } else {
         foreach ($img_list as $key => $gallery_img) {
             $gallery_img[$key]['thumb_url'] = '../' . (empty($gallery_img['thumb_url']) ? $gallery_img['img_url'] : $gallery_img['thumb_url']);
         }
     }
     //dump($goods);
 }
 /* 拆分商品名称样式 */
 $goods_name_style = explode('+', empty($goods['goods_name_style']) ? '+' : $goods['goods_name_style']);
 /* 创建 html editor */
 $goods['goods_desc'] = preg_replace('/src=images/', 'src=/images', $goods['goods_desc']);
 create_html_editor('goods_desc', $goods['goods_desc']);
 create_html_editor2('goods_shipai', 'goods_shipai', $goods['goods_shipai']);
 /* 模板赋值 */
 $smarty->assign('code', $code);
 $smarty->assign('ur_here', $is_add ? empty($code) ? $_LANG['02_goods_add'] : $_LANG['51_virtual_card_add'] : ($_REQUEST['act'] == 'edit' ? $_LANG['edit_goods'] : $_LANG['copy_goods']));
 $smarty->assign('action_link', isset($link) ? $link : list_link($is_add, $code));
 $smarty->assign('goods', $goods);
 $smarty->assign('goods_name_color', $goods_name_style[0]);
 $smarty->assign('goods_name_style', $goods_name_style[1]);
 //$smarty->assign('cat_list', cat_list(0, $goods['cat_id']));// 注释 2015-03-19 代理商跟主站的分类分开
 /*ccx 2015-03-18 代理商显示代理商自己的商品分类 start */
 $smarty->assign('cat_list', cat_list_ccx(0, $goods['cat_id']));
 /*ccx 2015-03-18 代理商显示代理商自己的商品分类 end */
 $smarty->assign('brand_list', get_brand_list());
 $smarty->assign('unit_list', get_unit_list());
 $smarty->assign('weight_unit', $is_add ? '1' : ($goods['goods_weight'] >= 1 ? '1' : '0.001'));
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:goods.php

示例2: create_html_editor

    $smarty->assign('output_editor', create_html_editor('output', '', true));
    $smarty->assign('hint_editor', create_html_editor('hint', '', true));
    $smarty->display('problem_info.tpl');
} elseif ($_REQUEST['act'] == 'edit') {
    include_once ROOT_PATH . 'fckeditor/fckeditor.php';
    $problemId = isset($_GET['problemId']) ? intval($_GET['problemId']) : 0;
    $problem = $db->getRow("select * from problem where problemId = '{$problemId}'");
    if ($problem) {
        $action_link = array('href' => 'problems.php?act=list', 'text' => 'Problem List');
        $smarty->assign('action_link', $action_link);
        $smarty->assign('ur_here', 'Edit Problem');
        $smarty->assign('problem', $problem);
        $smarty->assign('html_editor', create_html_editor('description', $problem['description'], true, '90%'));
        $smarty->assign('input_editor', create_html_editor('input', $problem['input'], true));
        $smarty->assign('output_editor', create_html_editor('output', $problem['output'], true));
        $smarty->assign('hint_editor', create_html_editor('hint', $problem['hint'], true));
        $smarty->assign('form_act', 'update');
        $smarty->display('problem_info.tpl');
    } else {
        sys_msg("Wrong Problem Id");
    }
} elseif ($_REQUEST['act'] == 'insert' || $_REQUEST['act'] == 'update') {
    $problemName = isset($_POST['problemName']) ? htmlspecialchars(trim($_POST['problemName'])) : '';
    $timelimit = isset($_POST['timelimit']) ? intval($_POST['timelimit']) : 0;
    $memorylimit = isset($_POST['memorylimit']) ? intval($_POST['memorylimit']) : 0;
    $spj = isset($_POST['spj']) ? intval($_POST['spj']) : 0;
    $show = isset($_POST['show']) ? intval($_POST['show']) : 0;
    $description = isset($_POST['description']) ? trim($_POST['description']) : '';
    $input = isset($_POST['input']) ? trim($_POST['input']) : '';
    $output = isset($_POST['output']) ? trim($_POST['output']) : '';
    $sample_input = isset($_POST['sample_input']) ? htmlspecialchars(trim($_POST['sample_input'])) : '';
开发者ID:thezawad,项目名称:xjoj,代码行数:31,代码来源:problems.php

示例3: create_html_editor

      </tr>
      <!--tr>
        <td class="narrow-label">上传文件</td>
        <td><input type="file" name="file">
          <span class="narrow-label">或输入文件地址
          <input name="file_url" type="text" value="<?php 
echo $file_url;
?>
" size="30" maxlength="255" />
          </span></td>
      </tr-->
    </table>
    <!--table width="100%" id="detail-table">
      <tr>
        <td><?php 
echo create_html_editor('content', $content);
?>
</td>
      </tr>
    </table-->
    <div class="button-div">
      <input type="hidden" name="add_time" value="<?php 
echo date('Y-m-d H:i:s');
?>
" />
      <input type="hidden" name="article_id" value="<?php 
echo $article_id;
?>
" />
      <input type="submit" value=" 提交 " class="button"  />
      <input type="reset" value=" 重置 " class="button" />
开发者ID:reake,项目名称:share-travel,代码行数:31,代码来源:article_info.php

示例4: join

 $sql = "select distinct city,region_name from " . $ecs->table('virtual_goods_district') . " as d left join (select region_id,region_name from " . $ecs->table('region') . " ) as r on r.region_id = d.city";
 $city = $db->getAll($sql);
 $smarty->assign('city', $city);
 /* 获取商圈 */
 $sql = "select d.district_id,v.district_name from " . $GLOBALS['ecs']->table('virtual_district') . " as d \n            left join " . $GLOBALS['ecs']->table('goods') . " as g on  d.goods_id = g.goods_id\n            left join " . $GLOBALS['ecs']->table('virtual_goods_district') . " as v on v.district_id = d.district_id\n            where d.goods_id = '{$_REQUEST['goods_id']}' and d.supplier_id = {$supplier_id}";
 $district = $db->getAll($sql);
 $district_ids = '';
 foreach ($district as $key => $value) {
     $district_ids = $district_ids . $value['district_id'] . ',';
 }
 $smarty->assign('district_ids', substr($district_ids, 0, strlen($district_ids) - 1));
 $smarty->assign('district', $district);
 /* 拆分商品名称样式 */
 $goods_name_style = explode('+', empty($goods['goods_name_style']) ? '+' : $goods['goods_name_style']);
 /* 创建 html editor */
 create_html_editor('goods_desc', htmlspecialchars($goods['goods_desc']));
 /* 修改 by www.68ecshop.com 百度编辑器 */
 /* 模板赋值 */
 $action_link = array('href' => 'virtual_goods.php?act=list&extension_code=virtual_good', 'text' => '返回商品列表');
 $smarty->assign('code', $code);
 $smarty->assign('ur_here', $is_add ? empty($code) ? $_LANG['03_goods_add'] : $_LANG['51_virtual_card_add'] : ($_REQUEST['act'] == 'edit' ? $_LANG['edit_goods'] : $_LANG['copy_goods']));
 $smarty->assign('action_link', $action_link);
 $smarty->assign('goods', $goods);
 $smarty->assign('goods_name_color', $goods_name_style[0]);
 $smarty->assign('goods_name_style', $goods_name_style[1]);
 $smarty->assign('cat_list', cat_list(0, $goods['cat_id']));
 // 代码修改_start_derek20150129admin_goods  www.68ecshop.com
 $smarty->assign('goods_cat_id', $goods['cat_id']);
 $smarty->assign('brand_list', get_brand_list(true));
 // 代码修改_start_derek20150129admin_goods  www.68ecshop.com
 $smarty->assign('unit_list', get_unit_list());
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:virtual_goods.php

示例5: date

            'act_id'  => 0,
            'start_time'    => date('Y-m-d', time() + 86400),
            'end_time'      => date('Y-m-d', time() + 4 * 86400),
            'price_ladder'  => array(array('amount' => 0, 'price' => 0))
        );
		create_html_editor('act_desc');
    }
    else
    {
        $group_buy_id = intval($_REQUEST['id']);
        if ($group_buy_id <= 0)
        {
            die('invalid param');
        }
        $group_buy = group_buy_info($group_buy_id);
		create_html_editor('act_desc',$group_buy['act_desc']);
    }
    $smarty->assign('group_buy', $group_buy);

    /* 模板赋值 */
    $smarty->assign('ur_here', $_LANG['add_group_buy']);
    $smarty->assign('action_link', list_link($_REQUEST['act'] == 'add'));
    $smarty->assign('cat_list', cat_list());
    $smarty->assign('brand_list', get_brand_list());

    /* 显示模板 */
    assign_query_info();
    $smarty->display('group_buy_info.htm');
}

/*------------------------------------------------------ */
开发者ID:norain2050,项目名称:mhFault,代码行数:31,代码来源:group_buy.php

示例6: admin_log

    admin_log($_POST['title'], 'add', 'article');
    clear_cache_files();
    // 清除相关的缓存文件
    sys_msg($_LANG['articleadd_succeed'], 0, $link);
}
/*------------------------------------------------------ */
//-- 编辑
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'edit') {
    /* 权限判断 */
    admin_priv('article_manage');
    /* 取文章数据 */
    $sql = "SELECT * FROM " . $ecs->table('article') . " WHERE article_id='{$_REQUEST['id']}'";
    $article = $db->GetRow($sql);
    /* 创建 html editor */
    create_html_editor('FCKeditor1', $article['content']);
    /* 取得分类、品牌 */
    $smarty->assign('goods_cat_list', cat_list());
    $smarty->assign('brand_list', get_brand_list());
    /* 取得关联商品 */
    $goods_list = get_article_goods($_REQUEST['id']);
    $smarty->assign('goods_list', $goods_list);
    $smarty->assign('article', $article);
    $smarty->assign('cat_select', article_cat_list(0, $article['cat_id']));
    $smarty->assign('ur_here', $_LANG['article_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['03_article_list'], 'href' => 'article.php?act=list&' . list_link_postfix()));
    $smarty->assign('form_action', 'update');
    assign_query_info();
    $smarty->display('article_info.htm');
}
if ($_REQUEST['act'] == 'update') {
开发者ID:norain2050,项目名称:mhFault,代码行数:31,代码来源:article.php

示例7: admin_log

    admin_log($_POST['title'], 'add', $sql);
    clear_cache_files();
    // 清除相关的缓存文件
    sys_msg("添加“" . $_POST['title'] . "”成功!", 0, $link);
}
/*------------------------------------------------------ */
//-- 编辑
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'edit') {
    /* 权限判断 */
    admin_priv('education_manage');
    /* 取文章数据 */
    $sql = "SELECT * FROM " . $ecs->table('education') . " WHERE education_id='{$_REQUEST['id']}'";
    $education = $db->GetRow($sql);
    /* 创建 html editor */
    create_html_editor('FCKeditor1', $education['content']);
    $smarty->assign('education', $education);
    $smarty->assign('ur_here', "编辑文章");
    $smarty->assign('action_link', array('text' => "文章列表", 'href' => 'education.php?act=list&' . list_link_postfix()));
    $smarty->assign('form_action', 'update');
    assign_query_info();
    $smarty->display('education_info.htm');
}
if ($_REQUEST['act'] == 'update') {
    /* 权限判断 */
    admin_priv('education_manage');
    /*检查文章名是否相同*/
    $is_only = $exc->is_only('title', $_POST['title'], $_POST['id']);
    if (!$is_only) {
        sys_msg(sprintf("此文章已经存在", stripslashes($_POST['title'])), 1);
    }
开发者ID:dalinhuang,项目名称:hteacher,代码行数:31,代码来源:education.php

示例8: admin_log

    admin_log($_POST['title'], 'add', 'article');
    clear_cache_files();
    // 清除相关的缓存文件
    sys_msg($_LANG['articleadd_succeed'], 0, $link);
}
/*------------------------------------------------------ */
//-- 编辑
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'edit') {
    /* 权限判断 */
    admin_priv('article_manage');
    /* 取文章数据 */
    $sql = "SELECT * FROM " . $ecs->table('article') . " WHERE article_id='{$_REQUEST['id']}'";
    $article = $db->GetRow($sql);
    /* 创建 html editor */
    create_html_editor('FCKeditor1', htmlspecialchars($article['content']));
    /* 修改 by www.68ecshop.com 百度编辑器 */
    /* 取得分类、品牌 */
    $smarty->assign('goods_cat_list', cat_list());
    $smarty->assign('brand_list', get_brand_list());
    /* 取得关联商品 */
    $goods_list = get_article_goods($_REQUEST['id']);
    $smarty->assign('goods_list', $goods_list);
    $smarty->assign('article', $article);
    $smarty->assign('cat_select', article_cat_list(0, $article['cat_id']));
    $smarty->assign('ur_here', $_LANG['article_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['03_article_list'], 'href' => 'article.php?act=list&' . list_link_postfix()));
    $smarty->assign('form_action', 'update');
    assign_query_info();
    $smarty->display('article_info.htm');
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:article.php

示例9: array

        $db->query($sql);
        $links[] = array('text' => $_LANG['magazine_list'], 'href' => 'magazine_list.php?act=list');
        $links[] = array('text' => $_LANG['add_new'], 'href' => 'magazine_list.php?act=add');
        sys_msg($_LANG['edit_ok'], 0, $links);
    }
} elseif ($_REQUEST['act'] == 'edit') {
    /* 修改 by www.68ecshop.com 百度编辑器 begin */
    //include_once(ROOT_PATH.'includes/fckeditor/fckeditor.php'); // 包含 html editor 类文件
    /* 修改 by www.68ecshop.com 百度编辑器 end */
    $id = intval($_REQUEST['id']);
    if (empty($_POST['step'])) {
        $rt = $db->getRow("SELECT * FROM " . $ecs->table('mail_templates') . " WHERE type = 'magazine' AND template_id = '{$id}'");
        $smarty->assign(array('id' => $id, 'act' => 'edit', 'magazine_name' => $rt['template_subject'], 'magazine_content' => $rt['template_content']));
        $smarty->assign(array('ur_here' => $_LANG['magazine_list'], 'act' => 'edit'));
        $smarty->assign('action_link', array('text' => $_LANG['go_list'], 'href' => 'magazine_list.php?act=list'));
        create_html_editor('magazine_content', htmlspecialchars($rt['template_content']));
        /* 修改 by www.68ecshop.com 百度编辑器 */
        assign_query_info();
        $smarty->display('magazine_list_add.htm');
    } elseif ($_POST['step'] == 2) {
        $magazine_name = trim($_POST['magazine_name']);
        $magazine_content = trim($_POST['magazine_content']);
        $magazine_content = str_replace('src=\\"', 'src=\\"http://' . $_SERVER['HTTP_HOST'], $magazine_content);
        $time = gmtime();
        $db->query("UPDATE " . $ecs->table('mail_templates') . " SET is_html = 1, template_subject = '{$magazine_name}', template_content = '{$magazine_content}', last_modify = '{$time}' WHERE type = 'magazine' AND template_id = '{$id}'");
        $links[] = array('text' => $_LANG['magazine_list'], 'href' => 'magazine_list.php?act=list');
        sys_msg($_LANG['edit_ok'], 0, $links);
    }
} elseif ($_REQUEST['act'] == 'del') {
    $id = intval($_REQUEST['id']);
    $db->query("DELETE  FROM " . $ecs->table('mail_templates') . " WHERE type = 'magazine' AND template_id = '{$id}' LIMIT 1");
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:magazine_list.php

示例10: create_html_editor

    if ($_REQUEST['act'] == 'add') {
        $smarty->assign('ur_here', 'Add News');
        $smarty->assign('form_act', 'insert');
        $smarty->assign('html_editor', create_html_editor('content', '', true));
    } else {
        $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
        $news = $db->getRow("select * from news where id='{$id}'");
        if (!$news) {
            sys_msg('There is no such news');
            exit;
        }
        $smarty->assign('ur_here', 'Edit News');
        $smarty->assign('news', $news);
        $smarty->assign('id', $id);
        $smarty->assign('form_act', 'update');
        $smarty->assign('html_editor', create_html_editor('content', $news['content'], true));
    }
    $smarty->display('news_info.tpl');
} elseif ($_REQUEST['act'] == 'update' || $_REQUEST['act'] == 'insert') {
    $title = isset($_POST['title']) ? htmlspecialchars(trim($_POST['title'])) : '';
    $content = isset($_POST['content']) ? trim($_POST['content']) : '';
    $nowtime = time();
    if (empty($title) || empty($content)) {
        sys_msg('Please provide full information');
    }
    $links[] = array('text' => 'News List', 'href' => 'news.php?act=list');
    if ($_REQUEST['act'] == 'insert') {
        $sql = "insert into news (title,content,addtime) values ('{$title}', '{$content}','{$nowtime}')";
        $db->query($sql);
        clear_all_files();
        sys_msg('News is added!', 0, $links);
开发者ID:thezawad,项目名称:xjoj,代码行数:31,代码来源:news.php

示例11: mysql_query

}
if ($_POST['submit2']) {
    $FCKvalue = $_POST['index_top'];
    $sql = "select * from ecs_myconfig where name = 'myindex2'";
    $result = mysql_query($sql);
    $num = mysql_num_rows($result);
    if ($num == 0) {
        $sql = "insert into ecs_myconfig set name = 'myindex2', value = '{$FCKvalue}'";
    } else {
        $sql = "update ecs_myconfig set value = '{$FCKvalue}' where name = 'myindex2'";
    }
    $query = mysql_query($sql);
    if ($query) {
        echo "<script>alert('保存成功!')</script>";
        echo "<script>self.location='myindex.php'</script>";
        exit;
    }
}
/*提取首页自定义区域内容*/
$sql = "select * from ecs_myconfig where name = 'myindex'";
$result = mysql_query($sql);
$lin = mysql_fetch_array($result);
/* 创建 html editor */
create_html_editor('goods_desc', $lin[1]);
/*提取首页top内容 2009-9-20*/
$sql = "select * from ecs_myconfig where name = 'myindex2'";
$result = mysql_query($sql);
$lin = mysql_fetch_array($result);
/* 创建 html editor 2009-9-20*/
create_html_editor2('index_top', $lin[1]);
$smarty->display('myindex.htm');
开发者ID:sdssly,项目名称:port2sae,代码行数:31,代码来源:myindex.php

示例12: mktime

$sess_id = $GLOBALS['sess']->get_session_id();
$auth = mktime();
$ac = md5($certi_id . 'SHOPEX_SMS' . $auth);
$url = 'http://service.shopex.cn/sms/index.php?certificate_id=' . $certi_id . '&sess_id=' . $sess_id . '&auth=' . $auth . '&ac=' . $ac;
/*------------------------------------------------------ */
//-- 列表编辑 ?act=list_edit
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list_edit') {
    //include_once(ROOT_PATH . 'includes/fckeditor/fckeditor.php'); // 包含 html editor 类文件
    admin_priv('shop_header');
    $group_list = get_shop_header();
    //echo "<pre>";
    //print_r($group_list);
    $smarty->assign('color', $group_list['shop_header_color']);
    /* 创建 html editor */
    create_html_editor('shop_header_text', htmlspecialchars($group_list['shop_header_text']));
    assign_query_info();
    $smarty->display('shop_header.htm');
} elseif ($_REQUEST['act'] == 'post') {
    $sql = "UPDATE " . $ecs->table('supplier_shop_config') . " SET value = '{$_POST['shop_header_color']}' WHERE code = 'shop_header_color' AND supplier_id=" . $_SESSION['supplier_id'];
    $db->query($sql);
    $sql = "UPDATE " . $ecs->table('supplier_shop_config') . " SET value = '{$_POST['shop_header_text']}' WHERE code = 'shop_header_text' AND supplier_id=" . $_SESSION['supplier_id'];
    $db->query($sql);
    $links[] = array('text' => '返回头部自定义', 'href' => 'shop_header.php?act=list_edit');
    sys_msg('设置成功!', 0, $links);
    /* 清除缓存 */
    clear_all_files();
} elseif ($_REQUEST['act'] == 'send_test_email') {
    /* 检查权限 */
    check_authz_json('shop_config');
    /* 取得参数 */
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:shop_header.php

示例13: admin_log

        }
    }
    admin_log($_POST['packing_name'], 'add', 'packing');
    $link[] = array('text' => $_LANG['back_list'], 'href' => 'packing.php?act=list');
    $link[] = array('text' => $_LANG['continue_add'], 'href' => 'packing.php?act=add');
    sys_msg($_LANG['add_succeed'], 0, $link);
} elseif ($_REQUEST['act'] == 'edit') {
    /* 权限判断 */
    admin_priv('packing_manage');
    $packing = get_packing_info($_REQUEST['id']);
    // 商品组合信息
    $packing_goods_list = get_packing_goods($_REQUEST['id']);
    // 组合商品列表
    $packing['article'] = htmlspecialchars_decode(get_packing_article($_REQUEST['id']));
    // 商品组合描述
    create_html_editor('article', $packing['article']);
    $smarty->assign('packing', $packing);
    $smarty->assign('ur_here', $_LANG['packing_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['00_packing_list'], 'href' => 'packing.php?act=list&' . list_link_postfix()));
    $smarty->assign('cat_list', cat_list());
    $smarty->assign('brand_list', get_brand_list());
    $smarty->assign('form_action', 'update');
    $smarty->assign('packing_goods_list', $packing_goods_list);
    assign_query_info();
    $smarty->display('packing_info.htm');
} elseif ($_REQUEST['act'] == 'update') {
    /* 权限判断 */
    admin_priv('packing_manage');
    $packing_id = intval($_POST['id']);
    /* 处理提交数据 */
    if (empty($_POST['packing_price'])) {
开发者ID:554119220,项目名称:kjrscrm,代码行数:31,代码来源:packing.php

示例14: addslashes

    }
    //产品主图----end
    $insert_product_desp['language_id'] = $_REQUEST['language_id'];
    $insert_product_desp['products_name'] = addslashes($_REQUEST['products_name']);
    $insert_product_desp['products_description'] = addslashes($_REQUEST['products_description']);
    $insert_product_desp['products_short_description'] = addslashes($_REQUEST['products_short_description']);
    $site_name = 'all';
    //添加记录
    $products_id = addProductBackEver(array('products' => $insert_product, 'site_name' => $site_name, 'products_description' => $insert_product_desp, 'categories_id' => $products_cat));
    $msg = '添加产品成功。';
    if ($is_set_attr) {
        include 'includes/aliexpress_attr_handle.php';
    }
}
$FCKeditor = create_html_editor('products_description', '');
$FCKeditor_short_desp = create_html_editor('products_short_description', '', 160);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>add product</title>
<script language="javascript" src="<?php 
echo JS_JUQERY;
?>
"></script>
<style type="text/css">
html,body{font-family:tahoma,arial,宋体,sans-serif;font-size:12px;padding:0px;margin:0px;}

.wrap{border:1px solid #ccc;margin:50px 100px 150px;}
table{width:100%;border-collapse:collapse;border:1px solid #ccc;}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:index_by_hand.php

示例15: VALUES

        $sql = "INSERT INTO " . $ecs->table('mail_templates') . " (template_code, is_html,template_subject, template_content, last_modify, type) VALUES('" . md5($magazine_name . $time) . "',1, '{$magazine_name}', '{$magazine_content}', '{$time}', 'magazine')";
        $db->query($sql);
        $links[] = array('text' => $_LANG['magazine_list'], 'href' => 'magazine_list.php?act=list');
        $links[] = array('text' => $_LANG['add_new'], 'href' => 'magazine_list.php?act=add');
        sys_msg($_LANG['edit_ok'], 0, $links);
    }
} elseif ($_REQUEST['act'] == 'edit') {
    include_once ROOT_PATH . 'includes/fckeditor/fckeditor.php';
    // 包含 html editor 类文件
    $id = intval($_REQUEST['id']);
    if (empty($_POST['step'])) {
        $rt = $db->getRow("SELECT * FROM " . $ecs->table('mail_templates') . " WHERE type = 'magazine' AND template_id = '{$id}'");
        $smarty->assign(array('id' => $id, 'act' => 'edit', 'magazine_name' => $rt['template_subject'], 'magazine_content' => $rt['template_content']));
        $smarty->assign(array('ur_here' => $_LANG['magazine_list'], 'act' => 'edit'));
        $smarty->assign('action_link', array('text' => $_LANG['go_list'], 'href' => 'magazine_list.php?act=list'));
        create_html_editor('magazine_content', $rt['template_content']);
        assign_query_info();
        $smarty->display('magazine_list_add.htm');
    } elseif ($_POST['step'] == 2) {
        $magazine_name = trim($_POST['magazine_name']);
        $magazine_content = trim($_POST['magazine_content']);
        $magazine_content = str_replace('src=\\"', 'src=\\"http://' . $_SERVER['HTTP_HOST'], $magazine_content);
        $time = gmtime();
        $db->query("UPDATE " . $ecs->table('mail_templates') . " SET is_html = 1, template_subject = '{$magazine_name}', template_content = '{$magazine_content}', last_modify = '{$time}' WHERE type = 'magazine' AND template_id = '{$id}'");
        $links[] = array('text' => $_LANG['magazine_list'], 'href' => 'magazine_list.php?act=list');
        sys_msg($_LANG['edit_ok'], 0, $links);
    }
} elseif ($_REQUEST['act'] == 'del') {
    $id = intval($_REQUEST['id']);
    $db->query("DELETE  FROM " . $ecs->table('mail_templates') . " WHERE type = 'magazine' AND template_id = '{$id}' LIMIT 1");
    $links[] = array('text' => $_LANG['magazine_list'], 'href' => 'magazine_list.php?act=list');
开发者ID:muqidi,项目名称:PHP,代码行数:31,代码来源:magazine_list.php


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