codes****@googl*****
codes****@googl*****
2008年 9月 28日 (日) 22:47:28 JST
Author: hirorongl Date: Sun Sep 28 06:46:54 2008 New Revision: 825 Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/ trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/index.php (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/install.php (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/install_doc.html (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/logview.php (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/style.css (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/ trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/index.php (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/install.php (contents, props changed) trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/readme_ja.html (contents, props changed) trunk/geeklog-1-jp-extended/public_html/captcha/ trunk/geeklog-1-jp-extended/public_html/captcha/auth_sister.css (contents, props changed) trunk/geeklog-1-jp-extended/public_html/captcha/bg1.png (contents, props changed) trunk/geeklog-1-jp-extended/public_html/captcha/bg2.png (contents, props changed) trunk/geeklog-1-jp-extended/public_html/captcha/captcha.php (contents, props changed) trunk/geeklog-1-jp-extended/public_html/captcha/captcha.png (contents, props changed) trunk/geeklog-1-jp-extended/public_html/tkgmaps/ trunk/geeklog-1-jp-extended/public_html/tkgmaps/index.php (contents, props changed) Removed: trunk/geeklog-1-jp-extended/plugins/captcha/admin/ trunk/geeklog-1-jp-extended/plugins/captcha/public_html/ trunk/geeklog-1-jp-extended/plugins/tkgmaps/admin/ trunk/geeklog-1-jp-extended/plugins/tkgmaps/public_html/ Log: tkgmapsとcaptchaの公開領域分の配置場所がおかしかったのを修正 Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/index.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/index.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,508 @@ +<?php +// +---------------------------------------------------------------------------+ +// | CAPTCHA v4 Plugin | +// +---------------------------------------------------------------------------+ +// | Admin Interface to CAPTCHA Plugin. | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2007 by the following authors: | +// | | +// | Author: mevan****@ecsne***** | +// | Hiroron - hiroron AT hiroron DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// + +require_once('../../../lib-common.php'); + +// Only let admin users access this page +if (!SEC_inGroup('Root')) { + // Someone is trying to illegally access this page + COM_errorLog("Someone has tried to illegally access the CAPTCHA Administration page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: " . $_SERVER['REMOTE_ADDR'],1); + $display = COM_siteHeader(); + $display .= COM_startBlock($LANG27[12]); + $display .= $LANG27[12]; + $display .= COM_endBlock(); + $display .= COM_siteFooter(true); + echo $display; + exit; +} + +function CP_array_sort($array, $key) { + for ($i=0;$i<sizeof($array);$i++) { + $sort_values[$i] = $array[$i][$key]; + } + asort($sort_values); + reset($sort_values); + while (list($arr_key, $arr_val) = each($sort_values)) { + $sorted_arr[] = $array[$arr_key]; + } + return $sorted_arr; +} + +function CP_getplugin_label() { + global $_PLUGINS; + + $plugin = array(); + $cnt = 0; + foreach ($_PLUGINS as $pi_name) { + $function = 'plugin_captcha_label_' . $pi_name; + if (function_exists($function)) { + $plugin[$cnt]['pi_name'] = $pi_name; + $plugin[$cnt]['label'] = $function(); + $cnt++; + } + } + return $plugin; +} + +function CP_getsisterpack_files($packdir, $ext, $cutext=true) { + $files = array(); + if ($dir = @opendir( $packdir )) { + while(($file = readdir($dir)) !== false) { + if (is_file($packdir.'/'.$file)) { + $pparts = pathinfo($packdir.'/'.$file); + if ($pparts['extension'] == $ext) { + $filename = $file; + if ($cutext) { + $filename = basename($file, '.'.$ext); + } + array_push($files, $filename); + } + } + } + closedir($dir); + } + return $files; +} + +$CP_config_auth_sister = array(); + +function CP_load_auth_sister_setting() { + global $_CONF, $CP_config_auth_sister; + + if ( file_exists($_CONF['path'] . 'plugins/captcha/class/auth_sister/config.inc.php') ) { + require($_CONF['path'] . 'plugins/captcha/class/auth_sister/config.inc.php'); + $CP_config_auth_sister['sister_mes_a'] = $auth_sister_mes_a; + $CP_config_auth_sister['sister_mes_b'] = $auth_sister_mes_b; + $CP_config_auth_sister['sister_len_min'] = $auth_sister_len_min; + $CP_config_auth_sister['sister_len_max'] = $auth_sister_len_max; + $CP_config_auth_sister['sister_outlen'] = $auth_sister_outlen; + + $sisterpack_dir = $_CONF['path'] . 'plugins/captcha/class/auth_sister/'.$auth_sister_load; + + if ( file_exists($sisterpack_dir.'/config.inc.php') ) { + require($sisterpack_dir.'/config.inc.php'); + $CP_config_auth_sister['sister_image'] = $auth_sister_image; + $CP_config_auth_sister['sister_font'] = $auth_sister_font; + $CP_config_auth_sister['sister_fsize'] = $auth_sister_fsize; + $CP_config_auth_sister['sister_fx'] = $auth_sister_fx; + $CP_config_auth_sister['sister_fy'] = $auth_sister_fy; + + // Sister Image Set + $sisterimages = CP_getsisterpack_files($sisterpack_dir,'png',false); + $set_select = '<select name="sister_image" id="sister_image">'; + for ( $i=0; $i < count($sisterimages); $i++ ) { + $set_select .= '<option value="'.$sisterimages[$i].'"'.($sisterimages[$i] == $auth_sister_image ? ' SELECTED ': '').'>'.$sisterimages[$i].'</option>'; + } + $set_select .= '</select>'; + $CP_config_auth_sister['set_select_sister_image'] = $set_select; + + // Sister Font Set + $sisterfonts = CP_getsisterpack_files($sisterpack_dir,'ttf'); + $set_select = '<select name="sister_font" id="sister_font">'; + for ( $i=0; $i < count($sisterfonts); $i++ ) { + $set_select .= '<option value="'.$sisterfonts[$i].'"'.($sisterfonts[$i] == $auth_sister_font ? ' SELECTED ': '').'>'.$sisterfonts[$i].'</option>'; + } + $set_select .= '</select>'; + $CP_config_auth_sister['set_select_sister_font'] = $set_select; + + } + if ( file_exists($sisterpack_dir.'/words.txt') ) { + $array_data = file($sisterpack_dir.'/words.txt'); + $CP_config_auth_sister['sister_words'] = join("",$array_data); + } + if ( file_exists($_CONF['path_html'].'captcha/auth_sister.css') ) { + $array_data = file($_CONF['path_html'].'captcha/auth_sister.css'); + $CP_config_auth_sister['sister_css'] = join("",$array_data); + } + } +} + +function CP_save_auth_sister_setting() { + global $_CONF, $CP_config_auth_sister; + + $conf1 = $_CONF['path'] . 'plugins/captcha/class/auth_sister/config.inc.php'; + if ( file_exists($conf1) ) { + if ( is_writable($conf1) ) { + $data = file($conf1); + $fp = fopen($conf1, "wb"); + if ($fp) { + foreach ($data as $row) { + $rep = false; + foreach ($CP_config_auth_sister as $key => $val) { + if (strpos($row, '$auth_'.$key) === 0) { + //$comment = preg_replace('/[^;]+(.*)/', '\1', $row); + switch( $key ) { + case 'sister_mes_a': + case 'sister_mes_b': + $str = '$auth_'.$key." = '".$val."';\n"; + break; + case 'sister_len_min': + case 'sister_len_max': + $str = '$auth_'.$key." = ".$val.";\n"; + break; + case 'sister_outlen': + $str = '$auth_'.$key.' = "'.$val.'";'."\n"; + break; + } + fwrite($fp, $str); + $rep = true; + break; + } + } + if ($rep == false) { + fwrite($fp, $row); + } + } + fclose($fp); + } + require($conf1); + $sisterpack_dir = $_CONF['path'] . 'plugins/captcha/class/auth_sister/'.$auth_sister_load; + $conf2 = $sisterpack_dir.'/config.inc.php'; + if ( file_exists($conf2) ) { + if ( is_writable($conf2) ) { + + // new sister image upload + $new_sister_image = ''; + $upfile = array(); + $upfile = $_FILES['new_sister_image']; + if ( isset($upfile['tmp_name']) && $upfile['tmp_name'] != '' ) { + $rc = move_uploaded_file($upfile['tmp_name'], $sisterpack_dir.'/'.$upfile['name']); + chmod ($sisterpack_dir.'/'.$upfile['name'] , 0644); + $new_sister_image = $upfile['name']; + } + // new font upload + $new_sister_font = ''; + $upfile = array(); + $upfile = $_FILES['new_sister_font']; + if ( isset($upfile['tmp_name']) && $upfile['tmp_name'] != '' ) { + $rc = move_uploaded_file($upfile['tmp_name'], $sisterpack_dir.'/'.$upfile['name']); + chmod ($sisterpack_dir.'/'.$upfile['name'] , 0644); + $new_sister_font = basename($upfile['name'],'.ttf'); + } + + $data = file($conf2); + $fp = fopen($conf2, "wb"); + if ($fp) { + foreach ($data as $row) { + $rep = false; + foreach ($CP_config_auth_sister as $key => $val) { + if (strpos($row, '$auth_'.$key) === 0) { + switch( $key ) { + case 'sister_image': + if ($new_sister_image != '') { + $str = '$auth_'.$key." = '".$new_sister_image."';\n"; + } else { + $str = '$auth_'.$key." = '".$val."';\n"; + } + break; + case 'sister_font': + if ($new_sister_font != '') { + $str = '$auth_'.$key." = '".$new_sister_font."';\n"; + } else { + $str = '$auth_'.$key." = '".$val."';\n"; + } + break; + case 'sister_fsize': + case 'sister_fx': + case 'sister_fy': + $str = '$auth_'.$key." = ".$val.";\n"; + break; + } + fwrite($fp, $str); + $rep = true; + break; + } + } + if ($rep == false) { + fwrite($fp, $row); + } + } + fclose($fp); + } + } + } + // words + if ( isset($CP_config_auth_sister['sister_words']) && $CP_config_auth_sister['sister_words'] != '' ) { + if ( file_exists($sisterpack_dir.'/words.txt') ) { + if ( is_writable($sisterpack_dir.'/words.txt') ) { + $fp = fopen($sisterpack_dir.'/words.txt',"wb"); + if ($fp) { fwrite($fp, $CP_config_auth_sister['sister_words']); } + fclose($fp); + } + } + } + // css + if ( isset($CP_config_auth_sister['sister_css']) && $CP_config_auth_sister['sister_css'] != '' ) { + if ( file_exists($_CONF['path_html'].'captcha/auth_sister.css') ) { + if ( is_writable($_CONF['path_html'].'captcha/auth_sister.css') ) { + $fp = fopen($_CONF['path_html'].'captcha/auth_sister.css',"wb"); + if ($fp) { fwrite($fp, $CP_config_auth_sister['sister_css']); } + fclose($fp); + } + } + } + } + } +} + +$msg = ''; + +if ( isset($_POST['mode']) ) { + $mode = $_POST['mode']; +} else { + $mode = ''; +} + +if ( $mode == $LANG_CP00['cancel'] && !empty($LANG_CP00['cancel']) ) { + header('Location:' . $_CONF['site_admin_url'] . '/moderation.php'); + exit; +} + +// Create integration other plugin +$other_plugins = CP_getplugin_label(); + +if ( $mode == $LANG_CP00['save'] && !empty($LANG_CP00['save']) ) { + $settings['anonymous_only'] = $_POST['anononly'] == 'on' ? 1 : 0; + $settings['remoteusers'] = $_POST['remoteusers'] == 'on' ? 1 : 0; + $settings['enable_comment'] = $_POST['comment'] == 'on' ? 1 : 0; + $settings['enable_story'] = $_POST['story'] == 'on' ? 1 : 0; + $settings['enable_registration'] = $_POST['registration'] == 'on' ? 1 : 0; + $settings['enable_contact'] = $_POST['contact'] == 'on' ? 1 : 0; + $settings['enable_emailstory'] = $_POST['emailstory'] == 'on' ? 1 : 0; + $settings['enable_forum'] = $_POST['forum'] == 'on' ? 1 : 0; + $settings['enable_mediagallery'] = $_POST['mediagallery'] == 'on' ? 1: 0; + + $settings['gfxDriver'] = COM_applyFilter($_POST['gfxdriver']); + $settings['gfxFormat'] = COM_applyFilter($_POST['gfxformat']); + $settings['gfxPath'] = addslashes($_POST['gfxpath']); + $settings['debug'] = $_POST['debug'] == 'on' ? 1 : 0; + $settings['imageset'] = COM_applyFilter($_POST['imageset']); + + // integration other plugin + if (count($other_plugins) > 0) { + foreach ($other_plugins as $oplugin) { + $opi_name = $oplugin['pi_name']; + $settings['enable_'.$opi_name] = $_POST[$opi_name] == 'on' ? 1: 0; + } + } + + foreach($settings AS $option => $value ) { + $value = addslashes($value); + DB_save($_TABLES['cp_config'],"config_name,config_value","'$option','$value'"); + $_CP_CONF[$option] = stripslashes($value); + } + + // write auth sister setting + foreach (array('sister_mes_a','sister_mes_b','sister_len_min','sister_len_max','sister_outlen','sister_image','new_sister_image','sister_font','new_sister_font','sister_fsize','sister_fx','sister_fy','sister_words','sister_css') as $key) { + switch($key) { + case 'sister_words': + case 'sister_css': + if ( get_magic_quotes_gpc() == 1 ) { + $val = stripslashes( $_POST[$key] ); + } else { + $val = $_POST[$key]; + } + break; + default: + $val = addslashes($_POST[$key]); + break; + } + if ($val != '') { + $CP_config_auth_sister[$key] = $val; + } + } + CP_save_auth_sister_setting(); + + $msg = $LANG_CP00['success']; +} + + +$display = ''; +$display = COM_siteHeader(); + +// Create template +if ( is_dir( $_CONF['path_layout'] . 'captcha/admin' ) ) { + $T = new Template($_CONF['path_layout'] . 'captcha/admin'); +} else { + $T = new Template($_CONF['path'] . 'plugins/captcha/templates/admin'); +} +$T->set_file (array ( + 'setting' => 'setting.thtml', + 'integrationitem' => 'integrationitem.thtml' + )); + +// Create navibar +require_once ($_CONF['path_system'] . 'classes/navbar.class.php'); +$navbar = new navbar; +$navbar->add_menuitem($LANG_CP00["setting_general"], 'showhideEditorDiv("page01",0);return false;',true); +$navbar->add_menuitem($LANG_CP00["setting_auth_sister"], 'showhideEditorDiv("page02",1);return false;',true); +$navbar->add_menuitem($LANG_CP00["setting_all"], 'showhideEditorDiv("all",2) ;return false;',true); +$navbar->set_selected($LANG_CP00["setting_general"]); + +// Create imageset +$imageset = array(); +$i = 0; +$directory = $_CONF['path'] . 'plugins/captcha/images/static/'; + +$dh = @opendir($directory); +while ( ( $file = @readdir($dh) ) != false ) { + if ( $file == '..' || $file == '.' ) { + continue; + } + $imagedir = $directory . $file; + if (@is_dir($imagedir)) { + if ( file_exists($imagedir . '/' . 'imageset.inc') ) { + include ( $imagedir . '/' . 'imageset.inc'); + $imageset[$i]['dir'] = $file; + $imageset[$i]['name'] = $staticimageset['name']; + $i++; + } + } +} + @ closedir($dh); + +$sImageSet = CP_array_sort($imageset,'name'); +$set_select = '<select name="imageset" id="imageset">'; +for ( $i=0; $i < count($sImageSet); $i++ ) { + $set_select .= '<option value="' . $sImageSet[$i]['dir'] . '"' . ($_CP_CONF['imageset'] == $sImageSet[$i]['dir'] ? ' SELECTED ': '') .'>' . $sImageSet[$i]['name'] . '</option>'; +} +$set_select .= '</select>'; + +// Create integration other plugin +if ( count($other_plugins) > 0 ) { + foreach($other_plugins as $oplugin) { + $opi_name = $oplugin['pi_name']; + $T->set_var( 'integration_name', $opi_name ); + $T->set_var( 'integration_label', $oplugin['label'] ); + $T->set_var( 'integration_checked', ($_CP_CONF['enable_'.$opi_name] ? ' CHECKED=CHECKED' : '') ); + + $T->parse( 'integration_elements', 'integrationitem', true ); + } +} + +// Create auth_sister Set +CP_load_auth_sister_setting(); + + +$T->set_var(array( + 'site_admin_url' => $_CONF['site_admin_url'], + 'site_url' => $_CONF['site_url'], + 'navlist' => $navbar->generate(), + 'anonchecked' => ($_CP_CONF['anonymous_only'] ? ' CHECKED=CHECKED' : ''), + 'remotechecked' => ($_CP_CONF['remoteusers'] ? ' CHECKED=CHECKED' : ''), + 'commentchecked' => ($_CP_CONF['enable_comment'] ? ' CHECKED=CHECKED' : ''), + 'storychecked' => ($_CP_CONF['enable_story'] ? ' CHECKED=CHECKED' : ''), + 'registrationchecked' => ($_CP_CONF['enable_registration'] ? ' CHECKED=CHECKED' : ''), + 'contactchecked' => ($_CP_CONF['enable_contact'] ? ' CHECKED=CHECKED' : ''), + 'emailstorychecked' => ($_CP_CONF['enable_emailstory'] ? ' CHECKED=CHECKED' : ''), + 'forumchecked' => ($_CP_CONF['enable_forum'] ? ' CHECKED=CHECKED' : ''), + 'mediagallerychecked' => ($_CP_CONF['enable_mediagallery'] ? ' CHECKED=CHECKED' : ''), + 'gdselected' => ($_CP_CONF['gfxDriver'] == 0 ? ' SELECTED=SELECTED' : ''), + 'gdsisterselected' => ($_CP_CONF['gfxDriver'] == 1 ? ' SELECTED=SELECTED' : ''), + 'imselected' => ($_CP_CONF['gfxDriver'] == 2 ? ' SELECTED=SELECTED' : ''), + 'noneselected' => ($_CP_CONF['gfxDriver'] == 3 ? ' SELECTED=SELECTED' : ''), + + 'jpgselected' => ($_CP_CONF['gfxFormat'] == 'jpg' ? ' SELECTED=SELECTED' : ''), + 'pngselected' => ($_CP_CONF['gfxFormat'] == 'png' ? ' SELECTED=SELECTED' : ''), + + 'gfxpath' => $_CP_CONF['gfxPath'], + + 'debugchecked' => ($_CP_CONF['debug'] ? ' CHECKED=CHECKED' : ''), + + 'lang_overview' => $LANG_CP00['captcha_info'], + 'lang_view_logfile' => $LANG_CP00['view_logfile'], + 'lang_admin' => $LANG_CP00['admin'], + 'lang_settings' => $LANG_CP00['enabled_header'], + 'lang_anonymous_only' => $LANG_CP00['anonymous_only'], + 'lang_enable_comment' => $LANG_CP00['enable_comment'], + 'lang_enable_story' => $LANG_CP00['enable_story'], + 'lang_enable_registration' => $LANG_CP00['enable_registration'], + 'lang_enable_contact' => $LANG_CP00['enable_contact'], + 'lang_enable_emailstory' => $LANG_CP00['enable_emailstory'], + 'lang_enable_forum' => $LANG_CP00['enable_forum'], + 'lang_enable_mediagallery' => $LANG_CP00['enable_mediagallery'], + 'lang_save' => $LANG_CP00['save'], + 'lang_cancel' => $LANG_CP00['cancel'], + 'lang_gfx_driver' => $LANG_CP00['gfx_driver'], + 'lang_gfx_format' => $LANG_CP00['gfx_format'], + 'lang_convert_path' => $LANG_CP00['convert_path'], + 'lang_gd_libs' => $LANG_CP00['gd_libs'], + 'lang_gd_sister_libs' => $LANG_CP00['gd_sister_libs'], + 'lang_imagemagick' => $LANG_CP00['imagemagick'], + 'lang_static_images' => $LANG_CP00['static_images'], + 'lang_debug' => $LANG_CP00['debug'], + 'lang_configuration' => $LANG_CP00['configuration'], + 'lang_integration' => $LANG_CP00['integration'], + 'lang_imageset' => $LANG_CP00['image_set'], + 'lang_remoteusers' => $LANG_CP00['remoteusers'], + 'selectImageSet' => $set_select, + 'lang_msg' => $msg, + 'version' => $_CP_CONF['version'], + 's_form_action' => $_CONF['site_admin_url'] . '/plugins/captcha/index.php', + 'val_sister_mes_a' => $CP_config_auth_sister['sister_mes_a'], + 'val_sister_mes_b' => $CP_config_auth_sister['sister_mes_b'], + 'val_sister_len_min' => $CP_config_auth_sister['sister_len_min'], + 'val_sister_len_max' => $CP_config_auth_sister['sister_len_max'], + 'val_sister_outlen' => $CP_config_auth_sister['sister_outlen'], + 'val_sister_image' => $CP_config_auth_sister['sister_image'], + 'selectSisterImage' => $CP_config_auth_sister['set_select_sister_image'], + 'val_sister_font' => $CP_config_auth_sister['sister_font'], + 'selectSisterFont' => $CP_config_auth_sister['set_select_sister_font'], + 'val_sister_fsize' => $CP_config_auth_sister['sister_fsize'], + 'val_sister_fx' => $CP_config_auth_sister['sister_fx'], + 'val_sister_fy' => $CP_config_auth_sister['sister_fy'], + 'val_sister_words' => $CP_config_auth_sister['sister_words'], + 'val_sister_css' => $CP_config_auth_sister['sister_css'], + 'lang_auth_sister' => $LANG_CP10['auth_sister'], + 'lang_auth_sister_package' => $LANG_CP10['auth_sister_package'], + 'lang_sister_mes_a' => $LANG_CP10['sister_mes_a'], + 'lang_sister_mes_b' => $LANG_CP10['sister_mes_b'], + 'lang_sister_len_min' => $LANG_CP10['sister_len_min'], + 'lang_sister_len_max' => $LANG_CP10['sister_len_max'], + 'lang_sister_outlen' => $LANG_CP10['sister_outlen'], + 'lang_sister_image' => $LANG_CP10['sister_image'], + 'lang_new_sister_image' => $LANG_CP10['new_sister_image'], + 'lang_sister_font' => $LANG_CP10['sister_font'], + 'lang_new_sister_font' => $LANG_CP10['new_sister_font'], + 'lang_sister_fsize' => $LANG_CP10['sister_fsize'], + 'lang_sister_fx' => $LANG_CP10['sister_fx'], + 'lang_sister_fy' => $LANG_CP10['sister_fy'], + 'lang_sister_words' => $LANG_CP10['sister_words'], + 'lang_sister_css' => $LANG_CP10['sister_css'], + 'xhtml' => XHTML, +)); + + +$T->parse('output', 'setting'); +$display .= $T->finish($T->get_var('output')); +$display .= COM_siteFooter(); +echo $display; +exit; + +?> \ No newline at end of file Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/install.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/install.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,180 @@ +<?php +// +---------------------------------------------------------------------------+ +// | CAPTCHA v4 Plugin | +// +---------------------------------------------------------------------------+ +// | admin/install.php | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2007 by the following authors: | +// | | +// | Author: Mark R. Evans - mevan****@ecsne***** | +// | Hiroron - hiroron AT hiroron DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// + +require_once('../../../lib-common.php'); +require_once($_CONF['path'] . '/plugins/captcha/config.php'); +require_once($_CONF['path'] . '/plugins/captcha/functions.inc'); + +$pi_name = 'captcha'; // Plugin name Must be 15 chars or less +$pi_version = $_CP_CONF['version']; // Plugin Version +$gl_version = '1.4.1'; // GL Version plugin for +$pi_url = 'http://hiroron.com'; // Plugin Homepage + +$base_path = $_CONF['path'] . 'plugins/'.$pi_name.'/'; + +// Only let Root users access this page +if (!SEC_inGroup('Root')) { + // Someone is trying to illegally access this page + COM_errorLog("Someone has tried to illegally access the CAPTCHA install/uninstall page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: $REMOTE_ADDR",1); + $display = COM_siteHeader(); + $display .= COM_startBlock($LANG_CP00['access_denied']); + $display .= $LANG_CP00['access_denied_msg']; + $display .= COM_endBlock(); + $display .= COM_siteFooter(true); + echo $display; + exit; +} + +function plugin_install_captcha() +{ + global $pi_name, $pi_version, $gl_version, $pi_url; + global $_TABLES, $_CONF, $LANG_CP00, $_DB_dbms, $base_path; + + COM_errorLog("Attempting to install the $pi_name Plugin",1); + $uninstall_plugin = 'plugin_uninstall_' . $pi_name; + + $_SQL = array (); + $_DEFVALUES = array (); + if (file_exists ($base_path . 'sql/' . $_DB_dbms . '_install.php')) { + require_once ($base_path . 'sql/' . $_DB_dbms . '_install.php'); + } + + // Create the plugin's table(s) + if (count ($_SQL) > 0) { + $use_innodb = false; + if (($_DB_dbms == 'mysql') && + (DB_getItem ($_TABLES['vars'], 'value', "name = 'database_engine'") + == 'InnoDB')) { + $use_innodb = true; + } + foreach ($_SQL as $sql) { + $sql = str_replace ('#group#', $admin_group_id, $sql); + if ($use_innodb) { + $sql = str_replace ('MyISAM', 'InnoDB', $sql); + } + DB_query ($sql); + if (DB_error ()) { + COM_errorLog ('Error creating table', 1); + $uninstall_plugin (); + return false; + } + } + } + + // Pre-populate tables or run any other SQL queries + COM_errorLog ('Inserting default data', 1); + if (count ($_DEFVALUES) > 0) { + foreach ($_DEFVALUES as $sql) { + $sql = str_replace ('#group#', $admin_group_id, $sql); + DB_query ($sql, 1); + if (DB_error ()) { + $uninstall_plugin (); + return false; + } + } + } + + // Register the plugin with Geeklog + COM_errorLog("Registering $pi_name plugin with Geeklog", 1); + DB_delete($_TABLES['plugins'],'pi_name',$pi_name); + DB_query("INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) " + . "VALUES ('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)"); + + if (DB_error()) { + COM_errorLog("Failure registering $pi_name plugin with Geeklog"); + $uninstall_plugin(); + return false; + exit; + } + + // Create initial log entry + CAPTCHA_errorLog("CAPTCHA Plugin Successfully Installed"); + COM_errorLog("Successfully installed the $pi_name Plugin!",1); + + return true; +} + +/* +* Main Function +*/ + +$action = COM_applyFilter($_POST['action']); + +$display = COM_siteHeader(); +$T = new Template($_CONF['path'] . 'plugins/'.$pi_name.'/templates'); +$T->set_file('install', 'install.thtml'); +$T->set_var('install_header', $LANG_CP00['install_header']); +$T->set_var('img',$_CONF['site_url'] . '/'.$pi_name.'/'.$pi_name.'.png'); +$T->set_var('cgiurl', $_CONF['site_admin_url'] . '/plugins/'.$pi_name.'/install.php'); +$T->set_var('admin_url', $_CONF['site_admin_url'] . '/plugins/'.$pi_name.'/index.php'); + +if ($action == 'install') { + $install_plugin = 'plugin_install_' . $pi_name; + if ($install_plugin()) { + $installMsg = sprintf($LANG_CP00['install_success'],$_CONF['site_admin_url'] . '/plugins/'.$pi_name.'/index.php'); + $T->set_var('installmsg1',$installMsg); + } else { + echo COM_refresh ($_CONF['site_admin_url'] . '/plugins.php?msg=72'); + } +} else if ($action == "uninstall") { + $uninstall_plugin = 'plugin_uninstall_' . $pi_name; + $uninstall_plugin('installed'); + $T->set_var('installmsg1',$LANG_CP00['uninstall_msg']); +} + +if (DB_count($_TABLES['plugins'], 'pi_name', $pi_name) == 0) { + $T->set_var('installmsg2', $LANG_CP00['uninstalled']); + $T->set_var('readme', $LANG_CP00['readme']); + $T->set_var('btnmsg', $LANG_CP00['install']); + $T->set_var('action','install'); + + $gl_version = VERSION; + $php_version = phpversion(); + + $glver = sprintf($LANG_CP00['geeklog_check'],$gl_version); + $phpver = sprintf($LANG_CP00['php_check'],$php_version); + $T->set_var(array( + 'lang_overview' => $LANG_CP00['overview'], + 'lang_details' => $LANG_CP00['details'], + 'cp_requirements' => $LANG_CP00['preinstall_check'], + 'gl_version' => $glver, + 'php_version' => $phpver, + 'install_doc' => $LANG_CP00['preinstall_confirm'], + )); +} else { + echo COM_refresh($_CONF['site_url'] . '/index.php?msg=1&plugin='.$pi_name); + exit; +} +$T->parse('output','install'); +$display .= $T->finish($T->get_var('output')); +$display .= COM_siteFooter(true); + +echo $display; + +?> Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/install_doc.html ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/install_doc.html Sun Sep 28 06:46:54 2008 @@ -0,0 +1,960 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<!-- $Id: install_doc.html 88 2006-08-25 00:37:54Z mevans0263 $ --> + + + + + + + + + + + + + + + + + + <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <title>Geeklog CAPTCHA Plugin Installation and Usage</title> + <style type="text/css"> +body { +margin: 1em 5%; +background: white; +color: black; +font-family: Verdana, Arial, Helvetica, sans-serif; +font-size: smaller; +} +h1 { +font-size: 1.4em; +} +h2 { +font-size: 1.2em; +} +h3 { +font-size: 1.0em; +} +p, ul, ol, li { +margin-top: 0.6em; +margin-bottom: 0.6em; +} +ul, ol { +margin-left: 0.9em; +padding-left: 0.9em; +} +code, kbd, var { +font-family: Courier, "Courier New", monospace; +} +table { +width: 100%; +} +td, th { +vertical-align: top; +padding: 4px; +line-height: 128%; +font-size: smaller; +} +th { +text-align: left; +background: silver; +} +.r2 { +background: rgb(240,240,240); +} +dt { +font-weight: bold; +} +.usual { +font-size: 100%; +} +.menu { +font-size: 90%; +background: #dddddd; +color: black; +} +.footer { +font-size: 90%; +background: #dddddd; +color: black; +} +.comment { +font-size: 80%; +} +.codeheader { font-family: Courier, "Courier New", monospace; } +a:link { color: #2222FF; background: transparent; } +a:visited { color: #2222FF; background: transparent; } +a:hover { color: #5252FF; background: transparent; } +/*a:hover { color: #333366; background: #AAAADD; }*/ +a:active { color: #2222FF; background: transparent; } +/* this is to prevent Mozilla from applying :hover on <a name="..."> */ +a[name] { color: black; background: transparent; } + </style> +</head> + + +<body style="width: 700px;"> + + + + + + + + +<h1>Geeklog CAPTCHA plugin - version 3.0.0</h1> + + + + + + + + + +<h3>Author: Mark R. Evans <mark****@gllab*****><span class="email"></span> +</h3> + + + + + + + + +<h3>Date: June 22, 2007 +</h3> +CAPTCHA v3.0 requires Geeklog v1.4.1 or higher.<br> + + + + + + + + +<br> + + + + + + + + +With Geeklog v1.4.1, there is full support built into Geeklog to support the CAPTCHA plugin with the following Geeklog features:<br> + + + + + + + + +<ul> + + + + + + + + + <li>New User Registration</li> + + + + + + + + + <li>Comments</li> + + + + + + + + + <li>Email User</li> + + + + + + + + + <li>Email Story</li> + + + + + + + + + <li>Story submission</li> + <li>Ability to force CAPTCHA for all remote users</li> + + + + + + + + +</ul> +Beginning with Forum v2.6, there is full support built into the Forum plugin to support the CAPTCHA plugin with forum posts.<br> +<br> +Beginning with Media Gallery v1.5.0, there is full support build into +Media Gallery to support the CAPTCHA plugin when sending electronic +Postcards. + + + + + + + +<h1>Overview</h1> + + + + + + + + +CAPTCHA is a native Geeklog plugin that provides an additional layer of security for spambots. <br> + + + + + + + + +<br> + + + + + + + + +A CAPTCHA (an acronym for "Completely Automated Public Turing test to +tell Computers and Humans Apart", trademarked by Carnegie Mellon +University) is a type of challenge-response test used in computing to +determine whether or not the user is human. By presenting a +difficult to read graphic of letters and numbers, it is assumed that +only a human could read and enter the characters properly. By +implementing the CAPTCHA test, it should help reduce the number of +Spambot entries on your site.<br> + + + + + + + + +<br> + + + + + + + + +CAPTCHA implementations are not full-proof, there are many methods to +bypass them. Although I have not seen any successful attempts to +bypass this implementation, it should only be used to provide another +layer of protection to your site. With a layered approach using +the Bad Behavior Plugin, SpamX Plugin, SLV Enhancement and the CAPTCHA +plugin, together these can provide a very secure Geeklog +implementation.<br> + + + + + + + + +<br> +Beginning with Geeklog v1.4.1 there is support built into Geeklog to +natively provide a CAPTCHA block for new user registrations, comment +submissions, email user, email story and story submissions.<br> + + + + + + + + +<h1>Geeklog CAPTCHA Plugin Installation +</h1> + + + + + + + + + +<p>The CAPTCHA Plugin follows the standard Geeklog plugins +procedure, which has not been well documented. +Below we will document two methods to install the Media Gallery files, +via +FTP and via standard shell access to the server.</p> + + + + + + + + + +<h3>FTP Installation +</h3> + + + + + + + + + +<p>If you do not have shell access to your server and can only +use an FTP client to access your server, follow these instructions. + If you have shell access to your server, you may want to jump +down to the <span style="font-weight: bold;">Shell +Access Installation </span>instructions below.</p> + + + + + + + + + +<p>To install CAPTCHA, or any Geeklog plugin, you will +need to un-archive the plugin on your local computer. The CAPTCHA +distribution will automatically create all the proper directories when +it is +un-archived. </p> + + + + + + + + + +<p>To un-archive a .gz file, you can use later copies of +WinZIP or WinRAR. </p> + + + + + + + + + +<ol> + + + + + + + + + + <li>Create a temporary +directory on your local hard drive to hold the Media Gallery files +(let's use C:\tmp for our example). </li> + + + + + + + + + + <li>Open the +captcha-3.0.0-1.4.1.tar.gz file with WinRAR. </li> + + + + + + + + + + <li>Select Extract All +Files and point to the C:\tmp directory as the destination. </li> + + + + + + + + + +</ol> + + + + + + + + + +<p>Now we should have a local copy of the CAPTCHA Plugin +in C:\tmp </p> + + + + + + + + + +<p>The directory should look like this:</p> + + + + + + + + + +<pre>+tmp\<br> + admin\<br> + docs\<br> + language\<br> + public_html\<br> + templates\<br> + functions.inc<br><br></pre> + + + + + + + + + +<p>Now that you have a copy on your local hard drive, it is +time to FTP up to your server. </p> + + + + + + + + + +<p>Start your FTP program, I recommend FileZilla if you do not +have a program you use already. +FileZilla is free and supports many different operating systems +(Windows, Linux, etc.).</p> + + + + + + + + + +<p>Connect to your web server with your FTP program. </p> + + + + + + + + + +<p>Our first FTP will be the entire CAPTCHA distribution +to your server. You will want to use the +diagrams below to find the proper directory on your server and move the +entire c:\tmp\captcha\ directory to the path-to-geeklog/plugins/ +directory. </p> + + + + + + + + + +<p>To find the path-to-geeklog +you can look in your Geeklog config.php file and see what directory is +defined +in the $_CONF[‘path’] line.</p> + + + + + + + + + +<p style="width: 600px;"><span style="font-weight: bold;">SPECIAL NOTE:</span> For +the initial FTP of the CAPTCHA +distribution, you will want to +actually drag the <span style="font-weight: bold;">captcha</span> +folder from your local computer to the plugins +directory on your server. The remaining +FTP’s below you will actually drag the files, not the parent +directory.</p> + + + + + + + + + +<pre>tmp\ path-to-geeklog/<br> | |<br> + captcha\--+ + backups/<br> | + data/<br> | + include/<br> | + language/<br> | + logs/<br> | + pdfs/<br> +------------->+ plugins/<br> + public_html/<br> + sql/<br> + system/<br> + config.php</pre> + + + + + + + + + +<p>Next, you will need to make a sub-directory under the +public_html +directory on your server called captcha. For most FTP programs you +can create directories by highlighting the parent directory, +public_html +in this case, then right click the mouse, select New Folder and name it captcha. +This procedure may be a little different depending on which FTP program +you are +using, check their documentation. </p> + + + + + + + + + +<pre> path-to-geeklog/<br> | <br> + backups/<br> + data/<br> + include/<br> + language/<br> + logs/<br> + pdfs/<br> + plugins/<br> + public_html/<br> | <br> + captcha <--- Make this subdirectory<br> + sql/<br> + system/<br> + config.php</pre> + + + + + + + + + +Next you will need to FTP all the files from the +c:\tmp\captcha\public_html\* directory to your server. Here you +will +want to select all the files and sub-directories in the public_html\ +directory, +not just the public_html\ folder. Follow the diagram below: +<pre>tmp\ path-to-geeklog/<br> | |<br> + captcha\ + backups/<br> | + data/<br> + public_html/*-+ + include/<br> | + language/<br> | + logs/<br> | + pdfs/<br> | + plugins/<br> | + public_html/<br> | | <br> +-------------->+ captcha/<br> + sql/<br> + system/<br> + config.php</pre> + + + + + + + + + +<p>Next, you will need to make a sub-directory under the +admin/plugins/ +directory on your server called <span style="font-weight: bold;">captcha</span>. </p> + + + + + + + + + +<pre>path-to-geeklog/<br> | <br> + backups/<br> + data/<br> + include/<br> + language/<br> + logs/<br> + pdfs/<br> + plugins/<br> + public_html/<br> | | <br> | + admin\<br> | | <br> | + plugins\<br> | + captcha <--- Make this subdirectory<br> + sql/<br> + system/<br> + config.php</pre> + + + + + + + + + +<p>Next you will need to FTP all the files from the +c:\tmp\captcha\admin\* directory to your server. Here you will +want to +select all the files and sub-directories in the admin\ directory, not +just the +public_html\ folder. Follow the map below: </p> + + + + + + + + + +<pre>tmp\ path-to-geeklog/<br> | |<br> + captcha\ + backups/<br> | + data/<br> + admin/---+ + include/<br> | + language/<br> | + logs/<br> | + pdfs/<br> | + plugins/<br> | + public_html/<br> | + admin/<br> | + plugins/<br> +-----------------------> + captcha/<br> + sql/<br> + system/<br> + config.php</pre> + + + + + + + + + +<p>Congratulations! You +should now have all the files uploaded to your server and you are ready +to skin +to the Online Installation step +below.</p> + + + + + + + + + +<h3>Standard Shell Access Installation +</h3> + + + + + + + + + +<ol> + + + + + + + + + + <li>It is always a good ideas to perform a site backup. The +CAPTCHA plugin does not create any database tables, but you should +always make a backup prior to installing a plugin. </li> + + + + + + + + + + <li>Uncompress the CAPTCHA plugin archive while in the path-to-geeklog/plugins +directory. The archive will create a directory called captcha. </li> + + + + + + + + + + <li>In your public_html +directory, create a directory called <span style="font-weight: bold;">captcha</span>. </li> + + + + + + + + + + <li>Under +public_html/admin/plugins/ directory, create a directory called <span style="font-weight: bold;">captcha</span>. </li> + + + + + + + + + + <li>Change to your +path-to-geeklog/plugins/captcha directory. </li> + + + + + + + + + + <li>Copy the files in +the admin directory to the admin/plugins/captcha directory you +created in step 4. </li> + + + + + + + + + + <li>Copy the files in +the public_html directory to the public_html/captcha directory you +created in step 3.</li> + + + + + + + + + +</ol> + + + + + + + + + +<h3>Online Installation +</h3> + + + + + + + + + +<p>Now that you have the files loaded on your server, it is +time to actually perform the CAPTCHA installation into Geeklog. </p> + + + + + + + + + +<ol start="1" type="1"> + + + + + + + + + + <li>Go to the plugin +administration page. The CAPTCHA plugin should show up with a +link to install it. Click this link. The install page will tell you if +it was successful or not. If not, examine the Geeklog error.log in +path-to-geeklog/logs/ to see what the problem was. Fix the problem and +re-install. </li> + + + + + + + + + + <li>Be sure and modify the CAPTCHA config.php file to +enable CAPTCHA support for the features you wish to use. By +default, CAPTCHA is turned off for all items. See Configuration +section below. </li> + + + + + + + + + +</ol> + + + + + + + + + +<h2>Upgrade Process</h2> + + + +Upgrading from v2.0 or later is very simple, just copy the new files +over to your system per the directions above. Then enter <b>Admins Only -> Plugins</b>, +select the CAPTCHA plugin, choose edit and upgrade. +<br> + + +<br> + + +After upgrading to v3.0.0, you will need to go into the online Administration Screens +and update your CAPTCHA settings. Updates are no longer maintained in the config.php file. +<br> + + +<br> + + +<h3>Upgrading from the original gl-cpatch custom registration</h3> + + + + +If you have the gl-captcha custom registration hack already installed, +there is no need to upgrade to the CAPTCHA plugin unless you are +running Geeklog v1.4.1+ or Forum 2.6+. The CAPTCHA plugin does +not offer any new features unless you are running the latest Geeklog or +Forum releases.<br> + + + + +<br> + + + + +If you wish to upgrade, you will need to uninstall the existing gl-captcha hack before installing the plugin.<br> + + + + +<br> + + + + +Follow these steps:<br> + + + + +<br> + + + + +<ol> + + + + + <li>Disable Geeklog's custom registration (change $_CONF['custom_registration'] to equal false in Geeklog's config.php file.</li> + + + + + <li>Remove the public_html/captcha/ files and directory.</li> + + + + + <li>Remove the /captcha-images/ files and directory.</li> + + + + + <li>Remove the edits to lib-custom.php and memberdetail.thtml that you made to install the gl-captcha hack.</li> + + + + +</ol> +<span style="font-weight: bold;"></span><br> + + + + +Keep in mind, you do not have to use Geeklog's custom registration to +enable CAPTCHA if you are running Geeklog v1.4.1 or greater.<br> + + +</body> +</html> Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/logview.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/logview.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,115 @@ +<?php +// +---------------------------------------------------------------------------+ +// | CAPTCHA v4 Plugin | +// +---------------------------------------------------------------------------+ +// | This Geeklog log file viewer. | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2003 by the following authors: | +// | | +// | Authors: Tom Willett - twill****@users***** | +// | Mark R. Evans - mevan****@ecsne***** | +// | Hiroron - hiroron AT hiroron DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// + +require_once('../../../lib-common.php'); + +// Path to this file +$path = $_CONF['site_admin_url']; + +// Only let mg admin users access this page +if (!SEC_inGroup('Root')) { + // Someone is trying to illegally access this page + COM_errorLog("Someone has tried to illegally access the LogView page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: " . $_SERVER['REMOTE_ADDR'],1); + $display = COM_siteHeader(); + $display .= COM_startBlock("Access Denied!!!"); + $display .= "You are illegally trying to access the File LogView page. This attempt has been logged"; + $display .= COM_endBlock(); + $display .= COM_siteFooter(true); + echo $display; + exit; +} +$log = COM_applyFilter($_REQUEST['log']); +/* +* Main Function +*/ + +$display = COM_siteHeader(); +$T = new Template($_CONF['path'] . '/plugins/captcha/templates'); +$T->set_file (array ('admin' => 'administration.thtml')); + +$T->set_var(array( + 'site_admin_url' => $_CONF['site_admin_url'], + 'site_url' => $_CONF['site_url'], + 'lang_admin' => $LANG_CP00['admin'], + 'version' => $_CONF['version'], + 'xhtml' => XHTML, +)); + +$retval .= "<br{XHTML}><p>Views/Clear the Geeklog Log Files.<p>"; +$retval .= "<form method=\"post\" action=\"{$path}/plugins/captcha/logview.php\">"; +$retval .= "File: "; +$files = array(); +if ($dir = @opendir($_CONF['path_log'])) { + while(($file = readdir($dir)) !== false) { + if (is_file($_CONF['path_log'] . $file)) { array_push($files,$file); } + } + closedir($dir); +} +$retval .= '<SELECT name="log">'; +if (empty($log)) { $log = $files[0]; } // default file to show +for ($i = 0; $i < count($files); $i++) { + $retval .= '<option value="' . $files[$i] . '"'; + if ($log == $files[$i]) { $retval .= ' SELECTED'; } + $retval .= '>' . $files[$i] . '</option>'; + next($files); +} +$retval .= "</SELECT> "; +$retval .= "<input type=\"submit\" name=\"action\" value=\"View Log File\"{XHTML}>"; +$retval .= " "; +$retval .= "<input type=\"submit\" name=\"action\" value=\"Clear Log File\"{XHTML}>"; +$retval .= "</form>"; + +$action = COM_applyFilter($_REQUEST['action']); + +if ($action == 'Clear Log File') { + unlink($_CONF['path_log'] . $log); + $timestamp = strftime( "%c" ); + $fd = fopen( $_CONF['path_log'] . $log, a ); + fputs( $fd, "$timestamp - Log File Cleared \n" ); + fclose($fd); + $action = 'View Log File'; +} +if ($action == 'View Log File') { + $retval .= "<hr{XHTML}><p><b>Log File: " . $log . "</b></p><pre>"; + $retval .= implode('', file($_CONF['path_log'] . $log)); + $retval .= "</pre>"; +} + +$T->set_var(array( + 'admin_body' => $retval, + 'title' => $LANG_CP00['log_viewer'], +)); + +$T->parse('output', 'admin'); +$display .= $T->finish($T->get_var('output')); +$display .= COM_siteFooter(); +echo $display; +exit; +?> \ No newline at end of file Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/style.css ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/captcha/style.css Sun Sep 28 06:46:54 2008 @@ -0,0 +1,139 @@ +form#captcha, +form#captcha input, +form#captcha select +{ + font-family : arial,verdana,tahoma,helvetica,sans-serif; +} + +form#captcha fieldset +{ + border : 1px solid #7F9DB9; + margin : 1em 0 1em 0; + padding : 0.5em 0 0.5em 0; +} + +form#captcha fieldset legend +{ + display : inline; + margin : 0 8px; + padding : 0 4px; +} + +form#captcha fieldset li +{ + margin : 0.5em 0; +} + +form#captcha fieldset.lv1 .indent +{ + margin-left : 15.5em; +} + +form#captcha fieldset.lv1 ul.indent, +form#captcha fieldset.lv1 ol.indent +{ + margin : -0.5em 0 0 15.5em; + padding : 0; + list-style : none; +} + +form#captcha fieldset.lv1 p +{ + clear : left; + margin : 2px 5em 8px 0; + padding : 0; + padding-left : 15.5em; + text-align : left; + line-height : 1.5; +} + +form#captcha fieldset.lv1 fieldset.lv2 +{ + margin : 1em 2em 1em 5em; +} + +form#captcha fieldset.lv1 fieldset.lv2 p.langitems +{ + clear : left; + margin : 2px 1em 8px 1em; + padding : 0; + text-align : left; +} + +form#captcha fieldset.lv1 fieldset.lv2 p span.langitem +{ + display : block; + float : left; + margin : 0; + padding : 0; + width : 33%; +} + +form#captcha fieldset.lv1 label, +form#captcha fieldset.lv1 span.label +{ + float : left; + margin-left : -15.5em; + width : 15em; + text-align : right; +} +form#captcha fieldset.lv1 label.normal +{ + float : none; + margin-left : 0; + width : auto; + text-align : left; + font-weight : normal; +} + +form#captcha p.info, +form#captcha fieldset.lv1 .info, +form#captcha fieldset.lv1 span.warningsmall +{ + font-size : 0.85em; + color : #1D9101; +} + +form#captcha fieldset.lv1 .warning +{ + color : red; +} + +form#captcha fieldset.lv1 .infobox +{ + font-size : 0.85em; + color : #555555; + width : 32em; + margin-left : 16em; + margin-bottom : 8px; +} +form#captcha fieldset.lv1 p textarea.textbox +{ + font-size : 10pt; + width : 100%; + min-width : 250px; + height : 20em; +} + +form#captcha fieldset.lv1 div textarea.textbox +{ + font-size : 10pt; + width : 95%; + min-width : 250px; + height : 20em; +} + + +form#captcha fieldset.lv1 legend +{ +/* font-weight : bold; */ +} + +form#captcha div.navbar +{ + margin-bottom : 1em; +} + +form#captcha fieldset.lv1 .langitem +{ +} Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/index.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/index.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,181 @@ +<?php + +// Reminder: always indent with 4 spaces (no tabs). +// +---------------------------------------------------------------------------+ +// | Universal Plugin 1.0.3 for Geeklog - The Ultimate Weblog | +// +---------------------------------------------------------------------------+ +// | admin/index.php | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2002 by the following authors: | +// | | +// | Author: | +// | Constructed with the Universal Plugin | +// | Copyright (C) 2002 by the following authors: | +// | Tom Willett - twill****@users***** | +// | Blaine Lang - langm****@sympa***** | +// | The Universal Plugin is based on prior work by: | +// | Tony Bibbs - tony****@tonyb***** | +// | | +// | modified by mystral-kk - geeklog AT mystral-k DOT net | +// | modified by dengen - dengen AT mail DOT trybase DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// 2008.05.14 v0.9 customed by G-COE, CSEAS. Addition of GoogleMapsEditor API Auto Tags +// Authors: Kinoshita +// Authors: Hiroron +// Director: IVY WE CO.,LTD. Komma +// $Id$ + +require_once '../../../lib-common.php'; +require_once ('../../auth.inc.php'); + +// Only let admin users access this page +if ( !SEC_hasRights( 'tkgmaps.admin' ) ) { + // Someone is trying to illegally access this page + COM_errorLog( "Someone has tried to illegally access the tkgmaps Admin page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: $REMOTE_ADDR", 1 ); + $display = COM_siteHeader(); + $display .= COM_startBlock( $LANG_TKGMAPS['access_denied'] ); + $display .= $LANG_TKGMAPS['access_denied_msg']; + $display .= COM_endBlock(); + $display .= COM_siteFooter( true ); + echo $display; + exit; +} + +function listtkgmaps() +{ + global $_CONF, $_TABLES, $LANG_ADMIN, $LANG_TKGMAPS; + + require_once( $_CONF['path_system'] . 'lib-admin.php' ); + + $retval = ''; + + $header_arr = array( + array( 'text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false), + array( 'text' => $LANG_TKGMAPS['googlemapsapikey'], 'field' => 'googlemapsapikey', 'sort' => false) + ); + + $defsort_arr = array( + 'field' => 'googlemapsapikey', + 'direction' => 'desc' + ); + + $menu_arr = array ( + array( 'url' => 'http://code.google.com/intl/ja/apis/maps/signup.html', 'text' => 'GoogleMapAPIKey の取得'), + array( 'url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home'] + ) + ); + + $text_arr = array( + 'has_menu' => true, + 'has_extras' => true, + 'instructions' => $LANG_TKGMAPS['instructions'], + 'icon' => $_CONF['site_url'] . '/tkgmaps/images/tkgmaps.gif', + 'form_url' => $_CONF['site_admin_url'] . "/plugins/tkgmaps/index.php" + ); + + $query_arr = array( + 'table' => 'tkgmaps', + 'sql' => "SELECT * FROM {$_TABLES['tkgmaps']} WHERE 1=1", + 'query_fields' => array('title'), + 'default_filter' => COM_getPermSql ('AND') + ); + + $defsort_arr = array(); +// $query_arr = array(); + + if (version_compare(VERSION, '1.5.0') >= 0) { + $retval .= COM_startBlock($LANG_TKGMAPS['manager'], '', COM_getBlockTemplate('_admin_block', 'header')); + $retval .= ADMIN_createMenu($menu_arr, $text_arr['instructions'], $text_arr['icon']); + $retval .= ADMIN_list ('tkgmaps', 'plugin_getListField_tkgmaps', $header_arr, + $text_arr, $query_arr, $defsort_arr); + $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); + } else { + $text_arr['title'] = $LANG_TKGMAPS['manager']; + $retval = ADMIN_list ('tkgmaps', 'plugin_getListField_tkgmaps', $header_arr, + $text_arr, $query_arr, $menu_arr, $defsort_arr); + } + + return $retval; +} + +function plugin_getListField_tkgmaps ($fieldname, $fieldvalue, $A, $icon_arr) +{ + global $_CONF, $LANG25, $LANG_ACCESS; + + $retval = ''; + + $access = SEC_hasAccess ($A['owner_id'], $A['group_id'], + $A['perm_owner'], $A['perm_group'], + $A['perm_members'], $A['perm_anon']); + if ($access > 0) { + switch($fieldname) { + case 'edit': + if ($access == 3) { // User is in Root group + $retval = "<a href='{$_CONF['site_admin_url']}/plugins/tkgmaps/index.php?mode=edit'>{$icon_arr['edit']}</a>"; + } + break; + default: + $retval = $fieldvalue; + break; + } + } else { + $retval = false; + } + + return $retval; +} + +// MAIN + +$display = ''; + +$mode = ''; +if (isset ($_REQUEST['mode'])) { + $mode = COM_applyFilter($_REQUEST['mode']); +} + +if (($mode == 'edit') || ($mode == 'edit_submit' && SEC_checkToken())){ + + $display .= COM_siteHeader ('menu', 'Editor'); + $display .= edit_tkgmaps ($mode); + +} else if (($mode == $LANG_ADMIN['save']) && !empty ($LANG_ADMIN['save'])) { + + $display .= COM_siteHeader ('menu', $LANG_TKGMAPS['manager']); + + + +} else if (($mode == $LANG_ADMIN['delete']) && !empty ($LANG_ADMIN['delete'])) { + + $display .= COM_siteHeader ('menu', $LANG_TKGMAPS['manager']); + + + +} else { // 'cancel' or no mode at all + + $display .= COM_siteHeader ('menu', $LANG_TKGMAPS['manager']); + $display .= listtkgmaps(); + +} + +$display .= COM_siteFooter (); + +echo $display; + +?> \ No newline at end of file Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/install.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/install.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,374 @@ +<?php + +// Reminder: always indent with 4 spaces (no tabs). +// +---------------------------------------------------------------------------+ +// | Universal Plugin 1.0.3 for Geeklog - The Ultimate Weblog | +// +---------------------------------------------------------------------------+ +// | admin/install.php | +// +---------------------------------------------------------------------------+ +// | This file installs and removes the data structures for the | +// | plugin for Geeklog. | +// | This is a complete functioning install routine. All you have to do is | +// | remove the sample data from the arrays and fill in the $GROUPS, $FEATURES | +// | $MAPPINGS, and $DEFVALUES arrays with your data. Then replace all | +// | occurances of tkgmaps and GoogleMaps with the name of your plugin | +// | and you will have a functioning install page for your plugin. | +// | Then customize the install display language in english.php and you are | +// | ready to distribute your plugin. | +// | Simply put here is what this install does: | +// | 1) It creates the tables | +// | 2) It creates an admin security group for you plugin | +// | 3) It adds the security features and adds them to the admin group | +// | 4) It adds the plugin to the gl_plugins table | +// | 5) It adds any default data you have provided | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2002 by the following authors: | +// | | +// | Author: | +// | Constructed with the Universal Plugin | +// | Copyright (C) 2002 by the following authors: | +// | Tom Willett - twill****@users***** | +// | Blaine Lang - langm****@sympa***** | +// | The Universal Plugin is based on prior work by: | +// | Tony Bibbs - tony****@tonyb***** | +// | | +// | modified by mystral-kk - geeklog AT mystral-k DOT net | +// | modified by dengen - dengen AT mail DOT trybase DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// 2008.05.14 v0.9 customed by G-COE, CSEAS. Addition of GoogleMapsEditor API Auto Tags +// Authors: Kinoshita +// Authors: Hiroron +// Director: IVY WE CO.,LTD. Komma +// $Id$ + +require_once '../../../lib-common.php'; +require_once $_CONF['path'] . 'plugins/tkgmaps/config.php'; +require_once $_CONF['path'] . 'plugins/tkgmaps/functions.inc'; + +// +// Universal plugin install variables +// Change these to match your plugin +// + +// Plugin display name +$pi_display_name = 'GoogleMaps'; + + +// Plugin name Must be 15 chars or less +$pi_name = 'tkgmaps'; + + +// Plugin Version +$pi_version = $_TKGMAPS_CONF['version']; + + +// GL Version plugin for +$gl_version = '1.4.1'; + + +// Plugin Homepage +$pi_url = 'http://www.tktools.jp'; + + +// Name of the Admin group +$pi_admin = $pi_display_name . ' Admin'; + + +// The plugin's groups - assumes first group to be the Admin group +$GROUPS = array(); +$GROUPS[$pi_admin] = 'Has full access to ' . $pi_name . ' features'; + + +// +// Security Feature(s) to add +// Fill in your security features here +// Note you must add these features to the uninstall routine in function.inc so that they will +// be removed when the uninstall routine runs. +// You do not have to use these particular features. You can edit/add/delete them +// to fit your plugins security model +// +$FEATURES = array (); +$FEATURES['tkgmaps.admin'] = "GoogleMaps Admin"; +//$FEATURES['tkgmaps.view'] = "GoogleMaps Viewer"; +//$FEATURES['tkgmaps.edit'] = "GoogleMaps Editor"; + +$MAPPINGS = array (); +$MAPPINGS['tkgmaps.admin'] = array ($pi_admin); +//$MAPPINGS['tkgmaps.view'] = array ($pi_admin); +//$MAPPINGS['tkgmaps.edit'] = array ($pi_admin); + + +// +// (optional) data to pre-populate tables with +// Insert table name and sql to insert default data for your plugin. +// Note: '#group#' will be replaced with the id of the plugin's admin group. +// +$DEFVALUES = array (); +$DEFVALUES[] = "INSERT INTO " . $_TABLES['tkgmaps'] . " (googlemapsapikey) VALUES ('取得したkeyを入れてください')"; +//$DEFVALUES[] = "INSERT INTO " . $_TABLES['table1'] . " (title, value) VALUES ('More Sample Data', 200)"; +//$DEFVALUES[] = "INSERT INTO " . $_TABLES['table2'] . " VALUES ('" . $_SERVER['REMOTE_ADDR'] . "')"; +//$DEFVALUES[] = "REPLACE INTO " . $_TABLES['autotags'] . " VALUES('googlemaps', '', 1, 1, '')"; +//$DEFVALUES[] = "REPLACE INTO " . $_TABLES['autotags'] . " VALUES('map', '', 1, 1, '')"; + + +/** + * Checks the requirements for this plugin and if it is compatible with this + * version of Geeklog. + * + * @return boolean true = proceed with install, false = not compatible + * + */ +function plugin_compatible_with_this_geeklog_version () +{ + if (!function_exists ('COM_truncate') || !function_exists ('MBYTE_strpos')) { + return false; + } + + return true; +} + +// +// ---------------------------------------------------------------------------- +// +// The code below should be the same for most plugins and usually won't +// require modifications. + +$base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/'; + +//$langfile = $base_path . 'language/' . $_CONF['language'] . '.php'; +//if (file_exists ($langfile)) { +// require_once ($langfile); +//} else { +// require_once ($base_path . 'language/english.php'); +//} +//require_once ($base_path . 'config.php'); +//require_once ($base_path . 'functions.inc'); + + +// Only let Root users access this page +if ( !SEC_inGroup( 'Root' ) ) { + // Someone is trying to illegally access this page + COM_accessLog( "Someone has tried to illegally access the tkgmaps install/uninstall page. " + . "User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: $REMOTE_ADDR", 1 ); + + $display = COM_siteHeader('menu', $LANG_ACCESS['accessdenied']) + . COM_startBlock($LANG_ACCESS['accessdenied']) + . $LANG_ACCESS['plugin_access_denied_msg'] + . COM_endBlock() + . COM_siteFooter(); + + echo $display; + exit; +} + +/** +* Puts the datastructures for this plugin into the Geeklog database +* +* Note: Corresponding uninstall routine is in functions.inc +* +* @return boolean True if successful False otherwise +* +*/ + +function plugin_install_now() +{ + global $_CONF, $_TABLES, $_USER, $_DB_dbms, + $GROUPS, $FEATURES, $MAPPINGS, $DEFVALUES, $base_path, + $pi_name, $pi_display_name, $pi_version, $gl_version, $pi_url; + + COM_errorLog ("Attempting to install the $pi_display_name plugin", 1); + + $uninstall_plugin = 'plugin_uninstall_' . $pi_name; + + // Create the plugin's groups + $admin_group_id = 0; + foreach ($GROUPS as $name => $desc) { + COM_errorLog ("Attempting to create $name group", 1); + + $grp_name = addslashes ($name); + $grp_desc = addslashes ($desc); + DB_query ("INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr) VALUES ('$grp_name', '$grp_desc')", 1); + if (DB_error ()) { + $uninstall_plugin (); + + return false; + } + + // replace the description with the new group id so we can use it later + $GROUPS[$name] = DB_insertId (); + + // assume that the first group is the plugin's Admin group + if ($admin_group_id == 0) { + $admin_group_id = $GROUPS[$name]; + } + } + + // Create the plugin's table(s) + $_SQL = array (); + if (file_exists ($base_path . 'sql/' . $_DB_dbms . '_install.php')) { + require_once ($base_path . 'sql/' . $_DB_dbms . '_install.php'); + } + + if (count ($_SQL) > 0) { + $use_innodb = false; + if (($_DB_dbms == 'mysql') && + (DB_getItem ($_TABLES['vars'], 'value', "name = 'database_engine'") + == 'InnoDB')) { + $use_innodb = true; + } + foreach ($_SQL as $sql) { + $sql = str_replace ('#group#', $admin_group_id, $sql); + if ($use_innodb) { + $sql = str_replace ('MyISAM', 'InnoDB', $sql); + } + DB_query ($sql); + if (DB_error ()) { + COM_errorLog ('Error creating table', 1); + $uninstall_plugin (); + + return false; + } + } + } + + // Add the plugin's features + COM_errorLog ("Attempting to add $pi_display_name feature(s)", 1); + + foreach ($FEATURES as $feature => $desc) { + $ft_name = addslashes ($feature); + $ft_desc = addslashes ($desc); + DB_query ("INSERT INTO {$_TABLES['features']} (ft_name, ft_descr) " + . "VALUES ('$ft_name', '$ft_desc')", 1); + if (DB_error ()) { + $uninstall_plugin (); + + return false; + } + + $feat_id = DB_insertId (); + + if (isset ($MAPPINGS[$feature])) { + foreach ($MAPPINGS[$feature] as $group) { + COM_errorLog ("Adding $feature feature to the $group group", 1); + DB_query ("INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($feat_id, {$GROUPS[$group]})"); + if (DB_error ()) { + $uninstall_plugin (); + + return false; + } + } + } + } + + // Add plugin's Admin group to the Root user group + // (assumes that the Root group's ID is always 1) + COM_errorLog ("Attempting to give all users in the Root group access to the $pi_display_name's Admin group", 1); + + DB_query ("INSERT INTO {$_TABLES['group_assignments']} VALUES " + . "($admin_group_id, NULL, 1)"); + if (DB_error ()) { + $uninstall_plugin (); + + return false; + } + + // Pre-populate tables or run any other SQL queries + COM_errorLog ('Inserting default data', 1); + foreach ($DEFVALUES as $sql) { + $sql = str_replace ('#group#', $admin_group_id, $sql); + DB_query ($sql, 1); + if (DB_error ()) { + $uninstall_plugin (); + + return false; + } + } + + // Finally, register the plugin with Geeklog + COM_errorLog ("Registering $pi_display_name plugin with Geeklog", 1); + + // silently delete an existing entry + DB_delete ($_TABLES['plugins'], 'pi_name', $pi_name); + + DB_query("INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) " + . "VALUES ('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)"); + + if (DB_error ()) { + $uninstall_plugin (); + + return false; + } + + // give the plugin a chance to perform any post-install operations + if (function_exists ('plugin_postinstall')) { + if (!plugin_postinstall ()) { + $uninstall_plugin (); + + return false; + } + } + + COM_errorLog ("Successfully installed the $pi_display_name plugin!", 1); + + return true; +} + +// MAIN +$display = ''; + +if ($_REQUEST['action'] == 'uninstall') { + $uninstall_plugin = 'plugin_uninstall_' . $pi_name; + if ($uninstall_plugin ()) { + $display = COM_refresh ($_CONF['site_admin_url'] + . '/plugins.php?msg=45'); + } else { + $display = COM_refresh ($_CONF['site_admin_url'] + . '/plugins.php?msg=73'); + } +} else if (DB_count ($_TABLES['plugins'], 'pi_name', $pi_name) == 0) { + // plugin not installed + + if (plugin_compatible_with_this_geeklog_version ()) { + if (plugin_install_now ()) { + $display = COM_refresh ($_CONF['site_admin_url'] + . '/plugins.php?msg=44'); + } else { + $display = COM_refresh ($_CONF['site_admin_url'] + . '/plugins.php?msg=72'); + } + } else { + // plugin needs a newer version of Geeklog + $display .= COM_siteHeader ('menu', $LANG32[8]) + . COM_startBlock ($LANG32[8]) + . '<p>' . $LANG32[9] . '</p>' + . COM_endBlock () + . COM_siteFooter (); + } +} else { + // plugin already installed + $display .= COM_siteHeader ('menu', $LANG01[77]) + . COM_startBlock ($LANG32[6]) + . '<p>' . $LANG32[7] . '</p>' + . COM_endBlock () + . COM_siteFooter(); +} + +echo $display; + +?> \ No newline at end of file Added: trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/readme_ja.html ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/tkgmaps/readme_ja.html Sun Sep 28 06:46:54 2008 @@ -0,0 +1,179 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="ja"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <meta http-equiv="Content-Style-Type" content="text/css"> + <title>Geeklog tkgmapsプラグインの使い方</title> + <style type="text/css"> + <!--> + body { + color: black; + background-color: white; + line-height: 1.5em; + } + .geeklog { + background-color: yellow; + } + .public { + background-color: #99ff00; + } + .admin { + background-color: aqua; + } + li { + padding: 5px 5px 10px 5px; + } + <! --> + </style> +</head> + +<body> + <h1>Geeklog tkgmapsプラグインの使い方:</h1> + + <p>自動タグを記事,静的ページ,ブロックで次のように記述して利用します。 </p> + <p>[maps:base <住所または 緯度,経度> width:<数字> + height:<数字> zoom:<数字> margin:<数字>]<br> + [maps:point <住所> title:<タイトル> icon:<アイコン種類 pngファイ ル名 拡張子なし> iconsize:<アイコンサイズ x,y> iconanchor:<アンカー位 置 top,left> infowindowanchor:<インフォウィンドウ位置 top,left> info:<インフォメーション> + <バルーン内自由なHTMLの記述>]<br> + <font color="#FF0000">・・・・複数pointを記述</font><br> + <br> + [maps:show]<br> + [maps:display]</p> + <p>width, height, zoom, margin, title, icon, png, infoなどの属性は省略 できます。</p> + <p>icon:blue-pushpin icon:green icon:picnic のようにアイコンをひとつ ひとつ変更できます。<br> + </p> + <table> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/blue-dot.png" alt="blue-dot.png" width="32" height="32"><br> + blue-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/red-dot.png" alt="red-dot.png" width="32" height="32"><br />red-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/green-dot.png" alt="green-dot.png" width="32" height="32"><br />green-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/ltblue-dot.png" alt="ltblue-dot.png" width="32" height="32"><br />ltblue-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/yellow-dot.png" alt="yellow-dot.png" width="32" height="32"><br />yellow-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/purple-dot.png" alt="purple-dot.png" width="32" height="32"><br />purple-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/pink-dot.png" alt="pink-dot.png" width="32" height="32"><br />pink-dot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/orange-dot.png" alt="orange-dot.png" width="32" height="32"><br />orange-dot</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/blue.png" alt="blue.png" width="32" height="32"><br />blue</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/red.png" alt="red.png" width="32" height="32"><br />red</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/green.png" alt="green.png" width="32" height="32"><br />green</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/lightblue.png" alt="ltblue.png" width="32" height="32"><br />lightblue</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/yellow.png" alt="yellow.png" width="32" height="32"><br />yellow</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/purple.png" alt="purple.png" width="32" height="32"><br />purple</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/pink.png" alt="pink.png" width="32" height="32"><br />pink</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/orange.png" alt="orange.png" width="32" height="32"><br />orange</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/blue-pushpin.png" alt="blue-pushpin.png" width="32" height="32"><br />blue-pushpin</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/red-pushpin.png" alt="red-pushpin.png" width="32" height="32"><br />red-pushpin</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/grn-pushpin.png" alt="grn-pushpin.png" width="32" height="32"><br />grn-pushpin</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/ltblu-pushpin.png" alt="ltblu-pushpin.png" width="32" height="32"><br />ltblu-pushpin</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/ylw-pushpin.png" alt="ylw-pushpin.png" width="32" height="32"><br />ylw-pushpin</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/purple-pushpin.png" alt="purple-pushpin.png" width="32" height="32"><br />purple-pushpin</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/pink-pushpin.png" alt="pink-pushpin.png" width="32" height="32"><br />pink-pushpin</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/restaurant.png" alt="restaurant.png" width="32" height="32"><br />restaurant</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/coffeehouse.png" alt="coffeehouse.png" width="32" height="32"><br />coffeehouse</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/bar.png" alt="bar.png" width="32" height="32"><br />bar</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/snack_bar.png" alt="snack_bar.png" width="32" height="32"><br />snack_bar</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/drinking_water.png" alt="drinking_water.png" width="32" height="32"><br />drinking_water</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/lodging.png" alt="lodging.png" width="32" height="32"><br />lodging</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/wheel_chair_accessible.png" alt="wheel_chair_accessible.png" width="32" height="32"><br />wheel_chair_accessible</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/shopping.png" alt="shopping.png" width="32" height="32"><br />shopping</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/movies.png" alt="movies.png" width="32" height="32"><br />movies</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/grocerystore.png" alt="grocerystore.png" width="32" height="32"><br />grocerystore</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/convienancestore.png" alt="convienancestore.png" width="32" height="32"><br />convienancestore</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/arts.png" alt="arts.png" width="32" height="32"><br />arts</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/homegardenbusiness.png" alt="homegardenbusiness.png" width="32" height="32"><br />homegardenbusiness</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/electronics.png" alt="electronics.png" width="32" height="32"><br />electronics</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/mechanic.png" alt="mechanic.png" width="32" height="32"><br />mechanic</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/pharmacy-us.png" alt="pharmacy-us.png" width="32" height="32"><br />pharmacy-us</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/realestate.png" alt="realestate.png" width="32" height="32"><br />realestate</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/salon.png" alt="salon.png" width="32" height="32"><br />salon</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/dollar.png" alt="dollar.png" width="32" height="32"><br />dollar</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/parkinglot.png" alt="parkinglot.png" width="32" height="32"><br />parkinglot</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/gas.png" alt="gas.png" width="32" height="32"><br />gas</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/cabs.png" alt="cabs.png" width="32" height="32"><br />cabs</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/bus.png" alt="bus.png" width="32" height="32"><br />bus</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/truck.png" alt="truck.png" width="32" height="32"><br />truck</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/rail.png" alt="rail.png" width="32" height="32"><br />rail</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/plane.png" alt="plane.png" width="32" height="32"><br />plane</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/ferry.png" alt="ferry.png" width="32" height="32"><br />ferry</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/helicopter.png" alt="helicopter.png" width="32" height="32"><br />helicopter</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/question.png" alt="question.png" width="32" height="32"><br />question</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/info.png" alt="info.png" width="32" height="32"><br />info</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/flag.png" alt="flag.png" width="32" height="32"><br />flag</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/earthquake.png" alt="earthquake.png" width="32" height="32"><br />earthquake</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/webcam.png" alt="webcam.png" width="32" height="32"><br />webcam</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/postoffice-us.png" alt="postoffice-us.png" width="32" height="32"><br />postoffice-us</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/police.png" alt="police.png" width="32" height="32"><br />police</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/firedept.png" alt="firedept.png" width="32" height="32"><br />firedept</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/hospitals.png" alt="hospitals.png" width="32" height="32"><br />hospitals</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/landmarks-jp.png" alt="landmarks-jp.png" width="32" height="32"><br />landmarks-jp</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/phone.png" alt="phone.png" width="32" height="32"><br />phone</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/caution.png" alt="caution.png" width="32" height="32"><br />caution</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/postoffice-jp.png" alt="postoffice-jp.png" width="32" height="32"><br />postoffice-jp</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/hotsprings.png" alt="hotsprings.png" width="32" height="32"><br />hotsprings</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/tree.png" alt="tree.png" width="32" height="32"><br />tree</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/campfire.png" alt="campfire.png" width="32" height="32"><br />campfire</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/picnic.png" alt="picnic.png" width="32" height="32"><br />picnic</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/campground.png" alt="campground.png" width="32" height="32"><br />campground</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/rangerstation.png" alt="rangerstation.png" width="32" height="32"><br />rangerstation</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/toilets.png" alt="toilets.png" width="32" height="32"><br />toilets</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/POI.png" alt="POI.png" width="32" height="32"><br />POI</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/hiker.png" alt="hiker.png" width="32" height="32"><br />hiker</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/cycling.png" alt="cycling.png" width="32" height="32"><br />cycling</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/motorcycling.png" alt="motorcycling.png" width="32" height="32"><br />motorcycling</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/horsebackriding.png" alt="horsebackriding.png" width="32" height="32"><br />horsebackriding</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/sportvenue.png" alt="sportvenue.png" width="32" height="32"><br />sportvenue</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/golfer.png" alt="golfer.png" width="32" height="32"><br />golfer</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/trail.png" alt="trail.png" width="32" height="32"><br />trail</td> + </tr> + <tr> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/water.png" alt="water.png" width="32" height="32"><br />water</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/snowflake_simple.png" alt="snowflake_simple.png" width="32" height="32"><br />snowflake_simple</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/marina.png" alt="marina.png" width="32" height="32"><br />marina</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/fishing.png" alt="fishing.png" width="32" height="32"><br />fishing</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/sailing.png" alt="sailing.png" width="32" height="32"><br />sailing</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/swimming.png" alt="swimming.png" width="32" height="32"><br />swimming</td> + <td width="12%"><img src="http://maps.google.co.jp/mapfiles/ms/icons/waterfalls.png" alt="waterfalls.png" width="32" height="32"><br />waterfalls</td> + </tr> + </table> + <p><br> + <br> + 参考:<br> + <a href="http://maoxiong.seesaa.net/article/45950146.html">http://maoxiong.seesaa.net/article/45950146.html</a><br> + png画像がいろいろ用意されています。.pngを除いたファイル名を指定すること で,<br> + このなかのアイコンをどれでも利用できます。<br> + <br> + 住所の代わりに,34.297306,132.31814 のように緯度・経度で記述することも できます。</p> + <p>自動タグの記述中に改行を入れないでください。アドバンストエディタを利 用すると自動的に改行が入る場合がありますので,注意してください。<br> + </p> + <p>例)<br> + [maps:base 京都市下京区裏片町206 width:500 height:500 zoom:12 margin:5]<br> + [maps:point 京都市左京区吉田下阿達町46 title:京都大学東南アジア研究所 icon:red info:京都大学東南アジア研究所吉田キャンパス <img src="http://www.cseas.kyoto-u.ac.jp/img/top_pic01_ja.gif" style="margin:4px; float:left"> <h2>京都大学東南アジア研究所</h2>吉田 キャンパス 薬学部構内<br>〒606-8501 京都市左京区吉田下阿達町46]<br> + [maps:point 京都市左京区北白川追分町 title:京都大学低温物質科学研究セン ター icon:green info:京都大学低温物質科学研究センター <img src="http://www.cseas.kyoto-u.ac.jp/img/top_pic03_ja.gif" style="margin:4px; float:left"><h2>京都大学低温物質科学研究センター </h2>吉田キャンパス 北部構内<br>〒606-8502 京都市左京区北白川追分町 ]<br> + [maps:point 京都市西京区京都大学桂 title:京都大学東南工学研究科附属環境 安全衛生センター icon:green info:京都大学東南工学研究科附属環境安全衛生セン ター <img src="http://www.cseas.kyoto-u.ac.jp/img/top_pic04_ja.gif" style="margin:4px; float:left"><h2>京都大学東南工学研究科附属環境安全衛生 センター</h2>桂キャンパス<br>〒615-8510 京都市西京区京都大学桂]<br> + [maps:show]<br> + [maps:display]<br> + <br> + </p> + +</body> +</html> Added: trunk/geeklog-1-jp-extended/public_html/captcha/auth_sister.css ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/captcha/auth_sister.css Sun Sep 28 06:46:54 2008 @@ -0,0 +1,38 @@ + @ charset "utf-8"; +/* CSS Document */ + +.reiya { + background-image: url(/captcha/captcha.php?mode=img); + background-repeat: no-repeat; + height: 150px; + width: 400px; +} +.reiyareiya{ + position:relative; + top:95px; + left:90px; +} +.reiya_input { + padding:0px; + margin:0px; + background-image: url(bg1.png); + background-repeat:repeat-x; + height: 25px; + width: 230px; + border: 1px #000 solid; + font-family:"MS Pゴシック", Osaka, "ヒラギノ角ゴ Pro W3"; + font-size:18px; + font-weight:bold; +} +.reiya_submit { + padding:0px; + margin:0px; + background-image: url(bg2.png); + background-repeat:repeat-x; + height: 27px; + width: 50px; + border: 1px #000 solid; + font-family:"MS Pゴシック", Osaka, "ヒラギノ角ゴ Pro W3"; + font-size:18px; + color:#fff; +} Added: trunk/geeklog-1-jp-extended/public_html/captcha/bg1.png ============================================================================== Binary file. No diff available. Added: trunk/geeklog-1-jp-extended/public_html/captcha/bg2.png ============================================================================== Binary file. No diff available. Added: trunk/geeklog-1-jp-extended/public_html/captcha/captcha.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/captcha/captcha.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,51 @@ +<?php +// +---------------------------------------------------------------------------+ +// | CAPTCHA v4 Plugin | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2007 by the following authors: | +// | | +// | Authors: | +// | Pascal Rehfeldt <Pasca****@Pasca*****> | +// | Mark R. Evans <mevan****@ecsne*****> | +// | Hiroron <hiroron AT hiroron DOT com> | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// + +// Prevent PHP from reporting uninitialized variables +error_reporting( E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR ); +require_once('../lib-common.php'); + +//Load the Class +require($_CONF['path'] . 'plugins/captcha/class/captcha.class.php'); + +// see if an existing session_id is passed +if (isset($_GET['csid']) ) { + $csid = COM_applyFilter($_GET['csid']); +} elseif ( isset($_GET['mode']) ) { + $mode = COM_applyFilter($_GET['mode']); + if ( $mode != 'img' ) { + die("Forbidden"); + } +} else { + die("Invalid session id"); +} + +//Create a CAPTCHA +$captcha = new captcha($csid); +?> \ No newline at end of file Added: trunk/geeklog-1-jp-extended/public_html/captcha/captcha.png ============================================================================== Binary file. No diff available. Added: trunk/geeklog-1-jp-extended/public_html/tkgmaps/index.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp-extended/public_html/tkgmaps/index.php Sun Sep 28 06:46:54 2008 @@ -0,0 +1,80 @@ +<?php + +// Reminder: always indent with 4 spaces (no tabs). +// +---------------------------------------------------------------------------+ +// | Universal Plugin 1.0.3 for Geeklog - The Ultimate Weblog | +// +---------------------------------------------------------------------------+ +// | public_html/tkgmaps/index.php | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2002 by the following authors: | +// | | +// | Author: | +// | Constructed with the Universal Plugin | +// | Copyright (C) 2002 by the following authors: | +// | Tom Willett - twill****@users***** | +// | Blaine Lang - langm****@sympa***** | +// | The Universal Plugin is based on prior work by: | +// | Tony Bibbs - tony****@tonyb***** | +// | | +// | modified by mystral-kk - geeklog AT mystral-k DOT net | +// | modified by dengen - dengen AT mail DOT trybase DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is free software; you can redistribute it and/or | +// | modify it under the terms of the GNU General Public License | +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +// | GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// 2008.05.14 v0.9 customed by G-COE, CSEAS. Addition of GoogleMapsEditor API Auto Tags +// Authors: Kinoshita +// Authors: Hiroron +// Director: IVY WE CO.,LTD. Komma +// $Id$ + +require_once '../lib-common.php'; + +// Check user has rights to access this page +if ( !SEC_hasRights( 'tkgmaps.edit,tkgmaps.view,tkgmaps.admin','OR' ) ) { + // Someone is trying to illegally access this page + COM_errorLog( "Someone has tried to illegally access the tkgmaps page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: $REMOTE_ADDR", 1 ); + $display = COM_siteHeader(); + $display .= COM_startBlock( $LANG_{lang_var_postfix}['access_denied'] ); + $display .= $LANG_{lang_var_postfix}['access_denied_msg']; + $display .= COM_endBlock(); + $display .= COM_siteFooter( true ); + echo $display; + exit; +} + +/* +* Main Function +*/ + +$display = COM_siteHeader(); +$T = new Template( $_CONF['path'] . 'plugins/tkgmaps/templates' ); +$T->set_file( 'page', 'index.thtml' ); +$T->set_var( 'header', $LANG_{lang_var_postfix}['plugin'] ); +$T->set_var( 'site_url', $_CONF['site_url'] ); +$T->set_var( 'icon_url', $_CONF['site_url'] . '/tkgmaps/images/tkgmaps.gif' ); +$T->set_var( 'plugin', 'tkgmaps' ); + +// your code goes here + + +$T->parse( 'output', 'page' ); +$display .= $T->finish( $T->get_var( 'output' ) ); +$display .= COM_siteFooter(); + +echo $display; + +?> \ No newline at end of file