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


PHP gcms::array2Ser方法代码示例

本文整理汇总了PHP中gcms::array2Ser方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::array2Ser方法的具体用法?PHP gcms::array2Ser怎么用?PHP gcms::array2Ser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gcms的用法示例。


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

示例1: rawurlencode

            // new row
            $row = '<dd id="config_category_' . $id . '">';
            $row .= '<span class="no">[' . $save['category_id'] . ']</span>';
            $row .= '<span class="icon-delete" id="config_category_delete_' . $id . '" title="' . $lng['LNG_DELETE'] . ' ' . $text . '">&nbsp;</span>';
            $row .= $text . ' <span id="config_category_name_' . $id . '" title="' . $lng['LNG_CLICK_TO'] . ' ' . $lng['LNG_EDIT'] . '">' . $topic[LANGUAGE] . '</span>';
            $row .= '</dd>';
            $ret['data'] = rawurlencode($row);
            $ret['newId'] = "config_category_" . $id;
        } elseif (preg_match('/^config_(category)_delete_([0-9]+)$/', $action, $match)) {
            // ลบหมวดหมู่
            $db->query("DELETE FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$module_id}' AND `id`='{$match['2']}' LIMIT 1");
            // รายการที่ลบ
            $ret['del'] = "config_{$match['1']}_" . $match[2];
        } elseif (preg_match('/^config_(category)_name_([0-9]+)$/', $action, $match)) {
            // แก้ไขชื่อหมวดหมู่
            $topic[LANGUAGE] = $db->sql_trim_str(gcms::oneLine($_POST['value']));
            $sql = "SELECT `id` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$module_id}' AND `id`='{$match['2']}' LIMIT 1";
            $category = $db->customQuery($sql);
            if (sizeof($category) == 1) {
                $db->edit(DB_CATEGORY, $category[0]['id'], array('topic' => gcms::array2Ser($topic)));
                // ส่งข้อมูลใหม่ไปแสดงผล
                $ret['edit'] = rawurlencode($topic[LANGUAGE]);
                $ret['editId'] = $action;
            }
        }
    }
} else {
    $ret['error'] = 'ACTION_ERROR';
}
// คืนค่าเป็น JSON
echo gcms::array2json($ret);
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_category_action.php

示例2: rawurlencode

                     $input = $key;
                     $error = 'DO_NOT_UPLOAD';
                 } else {
                     $ret["icon_{$k}"] = rawurlencode(DATA_URL . "board/{$icon[$k]}?{$mmktime}");
                 }
             }
         }
     }
     if (sizeof($icon) > 0) {
         $save['icon'] = gcms::array2Ser($icon);
     }
 }
 if (!$error) {
     $save['category_id'] = $category_id;
     $save['topic'] = gcms::array2Ser($topic);
     $save['detail'] = gcms::array2Ser($detail);
     // config
     $cfg = array();
     $can_post = isset($_POST['category_can_post']) ? $_POST['category_can_post'] : array();
     $can_post[] = 1;
     $can_view = gcms::getVars($_POST, 'category_can_view', array());
     $can_view[] = 1;
     $can_reply = gcms::getVars($_POST, 'category_can_reply', array());
     $can_reply[] = 1;
     $moderator = gcms::getVars($_POST, 'category_moderator', array());
     $moderator[] = 1;
     $img_upload_size = gcms::getVars($_POST, 'category_img_upload_size', 0);
     $img_law = gcms::getVars($_POST, 'category_img_law', 0);
     $img_upload_type = @implode(',', $_POST['category_img_upload_type']);
     $cfg[] = 'can_post=' . implode(',', $can_post);
     $cfg[] = 'can_view=' . implode(',', $can_view);
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_categorywrite_save.php


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