onokazu
onoka****@users*****
2005年 6月 8日 (水) 13:35:07 JST
Index: xoops2jp/html/modules/xoopspartners/index.php diff -u xoops2jp/html/modules/xoopspartners/index.php:1.2 xoops2jp/html/modules/xoopspartners/index.php:1.2.6.1 --- xoops2jp/html/modules/xoopspartners/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopspartners/index.php Wed Jun 8 13:35:07 2005 @@ -1,5 +1,5 @@ <?php -// $Id: index.php,v 1.2 2005/03/18 12:52:49 onokazu Exp $ +// $Id: index.php,v 1.2.6.1 2005/06/08 04:35:07 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -33,71 +33,71 @@ include XOOPS_ROOT_PATH."/header.php"; $part = new PartnerSystem(); if (! isset($start)){ - $start=0; + $start=0; } if ( !$start or $start == 0 and $xoopsModuleConfig['modlimit'] != 0) { - $init = 0; + $init = 0; } elseif ( $start != 0 and $xoopsModuleConfig['modlimit'] != 0) { - $init = $start; + $init = $start; } $admin = 0; if ($xoopsUser) { - $xoopsTpl->assign("partner_join" ,"<a href='join.php'><b>"._MD_JOIN."</b></a>"); + $xoopsTpl->assign("partner_join" ,"<a href='join.php'><b>"._MD_JOIN."</b></a>"); } $query = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("partners")." WHERE status=1"); list($numrows) = $xoopsDB->fetchrow($query); if( $xoopsModuleConfig['modlimit'] != 0 ) { - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); }else{ - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); } foreach ( $partners as $part_obj ) { - $array_partners[] = array( - "id" => $part_obj->getVar("id"), - "hits" => $part_obj->getVar("hits"), - "url" => $part_obj->getVar("url"), - "image" => $part_obj->getVar("image"), - "title" => $part_obj->getVar("title"), - "description" => $part_obj->getVar("description") - ); + $array_partners[] = array( + "id" => $part_obj->getVar("id"), + "hits" => $part_obj->getVar("hits"), + "url" => $part_obj->getVar("url"), + "image" => $part_obj->getVar("image"), + "title" => $part_obj->getVar("title"), + "description" => $part_obj->getVar("description") + ); } $partner_count = count($array_partners); for ( $i = 0; $i < $partner_count; $i++ ) { - $ImagePartner = "<a href='vpartner.php?id=".$array_partners[$i]["id"]."' target='_blank'>"; - if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { - $ImagePartner .= "<img src='".$array_partners[$i]["image"]."' alt='".$array_partners[$i]["url"]."' width='102' height='47' border='0' />"; - } - if ( $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= "<br />"; - } - if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= $array_partners[$i]["title"]; - } - $ImagePartner .= "</a>"; - $partner[$i]['id'] = $array_partners[$i]['id']; - $partner[$i]['hits'] = $array_partners[$i]['hits']; - $partner[$i]['url'] = $array_partners[$i]['url']; - $partner[$i]['image'] = $ImagePartner; - $partner[$i]['title'] = $array_partners[$i]['title']; - $partner[$i]['description'] = $array_partners[$i]['description']; - if ($xoopsUserIsAdmin) { - $partner[$i]['admin_option'] = "<br />[<a href='admin/index.php?op=editPartner&id=".$array_partners[$i]["id"]."'>"._MD_EDIT."</a>] [<a href='admin/index.php?op=delPartner&id=".$array_partners[$i]["id"]."'>"._MD_DELETE."</a>]"; - } - $xoopsTpl->append("partners", $partner[$i]); + $ImagePartner = "<a href='vpartner.php?id=".$array_partners[$i]["id"]."' target='_blank'>"; + if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { + $ImagePartner .= "<img src='".$array_partners[$i]["image"]."' alt='".$array_partners[$i]["url"]."' width='102' height='47' border='0' />"; + } + if ( $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= "<br />"; + } + if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= $array_partners[$i]["title"]; + } + $ImagePartner .= "</a>"; + $partner[$i]['id'] = $array_partners[$i]['id']; + $partner[$i]['hits'] = $array_partners[$i]['hits']; + $partner[$i]['url'] = $array_partners[$i]['url']; + $partner[$i]['image'] = $ImagePartner; + $partner[$i]['title'] = $array_partners[$i]['title']; + $partner[$i]['description'] = $array_partners[$i]['description']; + if ($xoopsUserIsAdmin) { + $partner[$i]['admin_option'] = "<br />[<a href='admin/index.php?op=editPartner&id=".$array_partners[$i]["id"]."'>"._MD_EDIT."</a>] [<a href='admin/index.php?op=delPartner&id=".$array_partners[$i]["id"]."'>"._MD_DELETE."</a>]"; + } + $xoopsTpl->append("partners", $partner[$i]); } if ( $xoopsModuleConfig['modlimit'] != 0 ) { - $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); - $pagenav = $nav->renderImageNav(); + $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); + $pagenav = $nav->renderImageNav(); } $xoopsTpl->assign(array( - "lang_partner" => _MD_PARTNER, - "lang_desc" => _MD_DESCRIPTION, - "lang_hits" => _MD_HITS, - "lang_no_partners" => _MD_NOPART, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'], - "pagenav" => $pagenav - )); + "lang_partner" => _MD_PARTNER, + "lang_desc" => _MD_DESCRIPTION, + "lang_hits" => _MD_HITS, + "lang_no_partners" => _MD_NOPART, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']), + "pagenav" => $pagenav + )); include_once XOOPS_ROOT_PATH.'/footer.php'; ?> \ No newline at end of file Index: xoops2jp/html/modules/xoopspartners/join.php diff -u xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1 xoops2jp/html/modules/xoopspartners/join.php:1.2.6.2 --- xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1 Thu Apr 21 19:06:35 2005 +++ xoops2jp/html/modules/xoopspartners/join.php Wed Jun 8 13:35:07 2005 @@ -1,5 +1,5 @@ <?php -// $Id: join.php,v 1.2.6.1 2005/04/21 10:06:35 onokazu Exp $ +// $Id: join.php,v 1.2.6.2 2005/06/08 04:35:07 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -131,7 +131,7 @@ "content4join" => $content, "lang_main_partner" => _MD_PARTNERS, "lang_join" => _MD_JOIN, - "sitename" => $xoopsConfig['sitename'] + "sitename" => htmlspecialchars($xoopsConfig['sitename']) )); } } else { // else -- if ( $xoopsUser )