From codesite-noreply @ google.com Tue Jun 2 21:55:27 2009 From: codesite-noreply @ google.com (codesite-noreply @ google.com) Date: Tue, 02 Jun 2009 12:55:27 +0000 Subject: [geeklog-jp commit] r1565 - url rewrite Message-ID: <000e0cd20d128be7e3046b5d0ed7@google.com> Author: tsuchi000 Date: Tue Jun 2 05:54:10 2009 New Revision: 1565 Added: trunk/plugins/filemgmt/update_20090602.html (contents, props changed) Removed: trunk/plugins/filemgmt/update_20080926.html Modified: trunk/plugins/filemgmt/public_html/include/dlformat.php trunk/plugins/filemgmt/public_html/index.php trunk/plugins/filemgmt/templates/filelisting_record.thtml Log: url rewrite Modified: trunk/plugins/filemgmt/public_html/include/dlformat.php ============================================================================== --- trunk/plugins/filemgmt/public_html/include/dlformat.php (original) +++ trunk/plugins/filemgmt/public_html/include/dlformat.php Tue Jun 2 05:54:10 2009 @@ -27,7 +27,7 @@ // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------- // - +//@@@@@20090602 update urlrewrite if (basename($GLOBALS['PHP_SELF']) == "dlformat.php") { exit(); @@ -63,21 +63,21 @@ $p->set_var('votestring', $votestring); } else { $p->set_var('rating',$rating); - $p->set_var('votestring', ''); + $p->set_var('votestring', ''); } if ($logourl != '') { $p->set_var('snapshot_icon',''); $p->set_var('snapshot_url',$filemgmt_FileSnapURL . $logourl); $p->set_var('LANG_CLICK2SEE', _MD_CLICK2SEE.$logourl); $p->set_var('show_snapshoticon',''); - $p->set_var('show_snapshoticon_na','none'); + $p->set_var('show_snapshoticon_na','none'); } else { $p->set_var('show_snapshoticon','none'); - $p->set_var('show_snapshoticon_na',''); + $p->set_var('show_snapshoticon_na',''); $p->set_var('snapshot_icon',''); $p->set_var('snapshot_url',''); $p->set_var('LANG_CLICK2SEE',''); -} +} $p->set_var('LANG_MD_SCREENSHOT_NA', _MD_SCREENSHOT_NA); $p->set_var('LANG_VERSION', _MD_VERSION); @@ -92,9 +92,9 @@ $p->set_var('end_dlreport_link',''); } else { $p->set_var('begin_dlreport_link',''); - $p->set_var('end_dlreport_link',''); + $p->set_var('end_dlreport_link',''); } -$p->set_var('download_times',sprintf(_MD_DLTIMES,$hits)); +$p->set_var('download_times',sprintf(_MD_DLTIMES,$hits)); $p->set_var('download_count',$hits); $p->set_var('LANG_FILESIZE',_MD_FILESIZE); $p->set_var('file_size',PrettySize($size)); @@ -114,21 +114,27 @@ $comment_link = '' . _MD_ENTERCOMMENT . ''; } $p->set_var('comment_link',$comment_link); - $p->set_var('show_comments',''); + $p->set_var('show_comments',''); } else { - $p->set_var('show_comments','none'); + $p->set_var('show_comments','none'); } $p->set_var('LANG_DOWNLOAD',_MD_DOWNLOAD); -$p->set_var('LANG_FILELINK',_MD_FILELINK); -$p->set_var('LANG_RATETHISFILE',_MD_RATETHISFILE); +$p->set_var('LANG_FILELINK',_MD_FILELINK); +$p->set_var('LANG_RATETHISFILE',_MD_RATETHISFILE); $p->set_var('LANG_REPORTBROKEN',_MD_REPORTBROKEN); +//@@@@@20090602add----> +$pageurl = COM_buildURL ($_CONF[site_url]. "/filemgmt/index.php?id=".$lid); +$readmore_link=COM_createLink(_MD_FILELINK, $pageurl); +$p->set_var('readmore_link',$readmore_link); +//@@@@@20090602add<---- + if ($FilemgmtAdmin) { $p->set_var('LANG_EDIT', _MD_EDIT); - $p->set_var('show_editlink',''); + $p->set_var('show_editlink',''); } else { - $p->set_var('LANG_EDIT', ''); + $p->set_var('LANG_EDIT', ''); $p->set_var('show_editlink','none'); } Modified: trunk/plugins/filemgmt/public_html/index.php ============================================================================== --- trunk/plugins/filemgmt/public_html/index.php (original) +++ trunk/plugins/filemgmt/public_html/index.php Tue Jun 2 05:54:10 2009 @@ -2,7 +2,7 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +-------------------------------------------------------------------------+ -// | File Management Plugin for Geeklog - by portalparts www.portalparts.com | +// | File Management Plugin for Geeklog - by portalparts www.portalparts.com | // | File: index.php | // | Main public script to view filemgmt categories and files | // +-------------------------------------------------------------------------+ @@ -31,6 +31,8 @@ // | | // +-------------------------------------------------------------------------+ // +//@@@@@20090602update urlrewrite + require_once("../lib-common.php"); include_once($_CONF[path_html]."filemgmt/include/header.php"); include($_CONF[path_html] ."filemgmt/include/functions.php"); @@ -58,11 +60,16 @@ $mytree->setGroupAccessFilter($_GROUPS); $display = COM_siteHeader('menu'); - $lid = COM_applyFilter($_GET['id'],true); + //@@@@@20090602update urlrewrite ----> + //$lid = COM_applyFilter($_GET['id'],true); + COM_setArgNames(array('id')); + $lid = COM_applyFilter(COM_getArgument('id'),true); + //@@@@@20090602update urlrewrite<----- + if ($lid == 0) { // Check if the script is being called from the commentbar $lid = str_replace('fileid_','',$_POST['id']); } - + $groupsql = filemgmt_buildAccessSql(); $sql = "SELECT COUNT(*) FROM {$_FM_TABLES['filemgmt_filedetail']} a "; @@ -71,24 +78,24 @@ list($fileAccessCnt) = DB_fetchArray( DB_query($sql)); if ($fileAccessCnt > 0 AND DB_count($_FM_TABLES['filemgmt_filedetail'],"lid",$lid ) == 1) { - + $p->set_var('block_header', COM_startBlock("". $LANG_FILEMGMT['plugin_name'] ."")); $p->set_var('block_footer', COM_endBlock()); - + require_once $_CONF['path_system'] . 'lib-comment.php'; - + $sql = "SELECT d.lid, d.cid, d.title, d.url, d.homepage, d.version, d.size, d.logourl, d.submitter, d.status, d.date, "; $sql .= "d.hits, d.rating, d.votes, d.comments, t.description FROM {$_FM_TABLES['filemgmt_filedetail']} d, "; $sql .= "{$_FM_TABLES['filemgmt_filedesc']} t WHERE d.lid='$lid' AND d.lid=t.lid AND status > 0"; - + $result = DB_query($sql); list($lid, $cid, $dtitle, $url, $homepage, $version, $size, $logourl, $submitter, $status, $time, $hits, $rating, $votes, $comments, $description) = DB_fetchARRAY($result); - + $pathstring = ""._MD_MAIN." : "; $nicepath = $mytree->getNicePathFromId($cid, "title", "{$_CONF['site_url']}/filemgmt/viewcat.php"); $pathstring .= $nicepath; $p->set_var('category_path_link',$pathstring); - + $rating = number_format($rating, 2); $dtitle = $myts->makeTboxData4Show($dtitle); $url = $myts->makeTboxData4Show($url); @@ -103,20 +110,19 @@ list ($submitter_name,$submitter_fullname,$photo) = DB_fetchARRAY($result2); $submitter_name = COM_getDisplayName ($submitter, $submitter_name, $submitter_fullname); include($_CONF[path_html] ."/filemgmt/include/dlformat.php"); - $p->set_var('cssid',1); $p->parse ('filelisting_records', 'records'); if (SEC_hasRights('filemgmt.edit')) { $delete_option = true; } else { $delete_option = false; - } + } $p->set_var('comment_records', CMT_userComments( "fileid_{$lid}", $title, 'filemgmt',$_POST['order'],$_POST['mode'],0,1,false,$delete_option)); $p->parse ('output', 'page'); $display .= $p->finish ($p->get_var('output')); } else { - + $p = new Template($_CONF['path'] . 'plugins/filemgmt/templates'); $p->set_file (array ( 'page' => 'filelisting.thtml', @@ -148,7 +154,7 @@ $countsql = DB_query($sql); list($maxrows) = DB_fetchArray($countsql); $numpages = ceil($maxrows / $show); - + $p->set_var('block_header', COM_startBlock(sprintf(_MD_LISTINGHEADING,$maxrows))); $p->set_var('block_footer', COM_endBlock()); $count = 0; @@ -167,7 +173,7 @@ $category_image_link .= ''; $p->set_var('category_link',$category_image_link); } else { - $p->set_var('category_link',' '); + $p->set_var('category_link',' '); } $downloadsWaitingSubmission = getTotalItems($myrow['cid'], 0); @@ -198,7 +204,7 @@ $chcount++; } $p->set_var('subcategories',$subcategories); - $count++; + $count++; if ($count == $numCategoriesPerRow) { $p->set_var('end_of_row',''); $p->parse ('category_records', 'category',true); @@ -207,13 +213,13 @@ } else { $p->set_var('end_of_row',''); $p->parse ('category_records', 'category',true); - $p->set_var('new_table_row',''); + $p->set_var('new_table_row',''); } } } } - - + + $offset = ($page - 1) * $show; $sql = "SELECT d.lid, d.cid, d.title, url, homepage, version, size, platform, submitter, logourl, status, "; @@ -254,7 +260,7 @@ $cssid = ($cssid == 2) ? 1 : 2; } } - + // Print Google-like paging navigation $base_url = $_CONF['site_url'] . '/filemgmt/index.php'; $p->set_var('page_navigation', COM_printPageNavigation($base_url,$page, $numpages)); Modified: trunk/plugins/filemgmt/templates/filelisting_record.thtml ============================================================================== --- trunk/plugins/filemgmt/templates/filelisting_record.thtml (original) +++ trunk/plugins/filemgmt/templates/filelisting_record.thtml Tue Jun 2 05:54:10 2009 @@ -19,19 +19,19 @@
WIKI JapanesefilemgmtFiles + +
+ +Ver1.5.3 ORIGINAL?Ń_?E?????[?h
+??{??Ł@??I?X?V??2008/01/29 ??{?????Ń_?E?????[?h
+
?t?@?C???i?t?H???_?j?? | +??I?ύX?? | +??l | +
/language/japanese.php | + +2007/06/16 | +1.5.2???ύX??? | +
/language/japanese_utf-8.php | +2007/06/16 | +1.5.2???ύX??? | + +
/public_htm/include/functions.php | +2008/01/29 | +date format multilang ?Ή??@by hiroron | +
functions.php | +2008/01/15 | + +Wht's New ?????????? | +
filemgmt.php | +2007/05/20 | +????l?ύX1.5.2???ύX??? | +
/sql/filemgmt_sql_install.php | +2008/01/15 | +?C???X?g?[????????J?e?S????? | +
1.5?p???C???@??I?X?V??2009/06/02??{?????Ń_?E?????[?h + +
+?t?@?C???i?t?H???_?j?? | +??I?ύX?? | +??l | +
/admin/index.php | +2008/09/17 | +CSRF checks | +
/admin/install.php | +2008/09/17 | + +CSRF checks | +
function.inc | +2009/06/02 | +include check urlrewrite | +
public_html/index.php | +2009/06/02 | +urlrewrite | +
public_html/include/dlformat.php | + +2009/06/02 | +urlrewrite | +
template/filelisting_record | +2009/06/02 | +urlrewrite | + +
???Fplugins/filemgmt/filemgmt.php?@(??肪?L??????Ă???t?@?C??)???t?@?C??????????Ă???????A?Ǘ??????X?V???????Ă????????B +
+ + + + +