function pical_todays_schedule_edit($options) { global $xoopsDB, $xoopsConfig; $mydirname = empty($options[0]) ? basename(dirname(dirname(__FILE__))) : $options[0]; $now_cid = empty($options[1]) ? 0 : intval($options[1]); // setting physical & virtual paths $mod_path = XOOPS_ROOT_PATH . "/modules/{$mydirname}"; $mod_url = XOOPS_URL . "/modules/{$mydirname}"; // defining class of piCal require_once "{$mod_path}/class/piCal.php"; require_once "{$mod_path}/class/piCal_xoops.php"; // creating an instance of piCal $cal = new piCal_xoops(date('Y-n-j'), $xoopsConfig['language'], true); $cal->use_server_TZ = true; // setting properties of piCal $cal->conn = $xoopsDB->conn; include "{$mod_path}/include/read_configs.php"; $cal->base_url = $mod_url; $cal->base_path = $mod_path; $cal->images_url = "{$mod_url}/images/{$skin_folder}"; $cal->images_path = "{$mod_path}/images/{$skin_folder}"; $ret = "<input type='hidden' name='options[0]' value='{$mydirname}' />\n"; // カテゴリー選択ボックスの生成 $ret .= _MB_PICAL_CATSEL . ':'; $ret .= "<select name='options[1]'>\n<option value='0'>" . _ALL . "</option>\n"; foreach ($cal->categories as $cid => $cat) { $selected = $now_cid == $cid ? "selected='selected'" : ""; $depth_desc = str_repeat('-', intval($cat->cat_depth)); $cat_title4show = $cal->text_sanitizer_for_show($cat->cat_title); $ret .= "\t<option value='{$cid}' {$selected}>{$depth_desc} {$cat_title4show}</option>\n"; } $ret .= "</select>\n"; return $ret; }