本文整理汇总了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 . '"> </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);
示例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);