svnno****@sourc*****
svnno****@sourc*****
2009年 8月 28日 (金) 10:20:28 JST
Revision: 36 http://sourceforge.jp/projects/xoopstokita/svn/view?view=rev&revision=36 Author: tokita Date: 2009-08-28 10:20:28 +0900 (Fri, 28 Aug 2009) Log Message: ----------- ãæ°ã«å ¥ãæ©è½ Modified Paths: -------------- spicky/trunc/xoops_trust_path/modules/spicky/include/db.php spicky/trunc/xoops_trust_path/modules/spicky/language/japanese/main.php spicky/trunc/xoops_trust_path/modules/spicky/main/image.php spicky/trunc/xoops_trust_path/modules/spicky/main/paint.php spicky/trunc/xoops_trust_path/modules/spicky/sql/mysql.sql spicky/trunc/xoops_trust_path/modules/spicky/templates/image.html spicky/trunc/xoops_trust_path/modules/spicky/templates/image_manage.html Added Paths: ----------- spicky/trunc/xoops_trust_path/modules/spicky/class/SpickyD3commentStory.class.php spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark.php spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_add.php spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage.php spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage_delete.php spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark.html spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark_manage.html Added: spicky/trunc/xoops_trust_path/modules/spicky/class/SpickyD3commentStory.class.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/class/SpickyD3commentStory.class.php (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/class/SpickyD3commentStory.class.php 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,74 @@ +<?php + +require_once XOOPS_TRUST_PATH.'/modules/d3forum/class/D3commentAbstract.class.php' ; +require_once XOOPS_TRUST_PATH.'/modules/d3forum/include/comment_functions.php' ; + + +// a class for d3forum comment integration +class SpickyD3commentStory extends D3commentAbstract { + +function fetchSummary( $external_link_id ) +{ + $db =& Database::getInstance() ; + $myts =& MyTextsanitizer::getInstance() ; + + $module_handler =& xoops_gethandler( 'module' ) ; + $module =& $module_handler->getByDirname( $this->mydirname ) ; + + $storyid = intval( $external_link_id ) ; + $mydirname = $this->mydirname ; + if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; + + $mytrustdirpath = dirname(dirname(__FILE__)) ; + //require_once dirname(dirname(__FILE__)).'/class/bulletin.php' ; + + if( false && Bulletin::isPublishedExists( $mydirname , $storyid ) ){ + +// $article = new Bulletin( $mydirname , $storyid ) ; +// $subject4assign = $article->getVar( 'title' ) ; +// $summary = $article->getVar('hometext') ; + +// if( function_exists( 'easiestml' ) ) { +// $summary = easiestml( $summary ) ; +// } +// $summary4assign = htmlspecialchars( xoops_substr( $this->unhtmlspecialchars( strip_tags( $summary ) ) , 0 , 255 ) , ENT_QUOTES ) ; + + } else { + + $subject4assign = '' ; + $summary4assign = '' ; + + } + + return array( + 'dirname' => $mydirname , + 'module_name' => $module->getVar( 'name' ) , + 'subject' => $subject4assign , + 'uri' => XOOPS_URL.'/modules/'.$mydirname.'/index.php?page=article&storyid='.$storyid , + 'summary' => $summary4assign , + ) ; + + +} + + +// get id from <{$story.id}> +function external_link_id( $params ) +{ + $story = $this->smarty->get_template_vars( 'story' ) ; + return intval( $story['id'] ) ; +} + + +// get escaped subject from <{$story.title}> +function getSubjectRaw( $params ) +{ + $story = $this->smarty->get_template_vars( 'story' ) ; + return $this->unhtmlspecialchars( $story['title'] , ENT_QUOTES ) ; +} + + + +} + +?> \ No newline at end of file Modified: spicky/trunc/xoops_trust_path/modules/spicky/include/db.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/include/db.php 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/include/db.php 2009-08-28 01:20:28 UTC (rev 36) @@ -472,4 +472,93 @@ $result = $xoopsDB->queryF($sql); } +function spicky_get_bookmark_list($user_id, $offset, $limit) +{ + global $xoopsDB; + global $mydirname; + $sql = 'SELECT b.image_id as id, i.code as code, i.reg_user as reg_user, '; + $sql .= ' i.title as title, i.desc as `desc`, i.type as `type`, '; + $sql .= ' i.width as width, i.height as height, i.view as `view`, '; + $sql .= ' b.id as bookmark_id '; + $sql .= ' FROM '; + $sql .= $xoopsDB->prefix($mydirname . '_bookmark') . ' AS b, '; + $sql .= $xoopsDB->prefix($mydirname . '_image') . ' AS i '; + $sql .= ' WHERE '; + $sql .= ' b.user_id = ' . intval($user_id) . ' AND '; + $sql .= ' b.image_id = i.id '; + $sql .= ' LIMIT ' . intval($offset) . ', ' . intval($limit); + + $result = $xoopsDB->query($sql); + + $list = array(); + + while ($row = $xoopsDB->fetchArray($result)) { + $list[] = $row; + } + + return $list; +} + +function spicky_get_bookmark_count($user_id) +{ + global $xoopsDB; + global $mydirname; + + $sql = 'SELECT count(id) AS cnt FROM ' . $xoopsDB->prefix($mydirname . '_bookmark'); + $sql .= ' WHERE '; + $sql .= ' user_id = ' . intval($user_id); + + $result = $xoopsDB->query($sql); + + $row = $xoopsDB->fetchArray($result); + + return intval($row['cnt']); +} + +function spicky_get_bookmark_by_image_id($image_id, $user_id) +{ + global $xoopsDB; + global $mydirname; + + $sql = 'SELECT * FROM ' . $xoopsDB->prefix($mydirname . '_bookmark'); + $sql .= ' WHERE '; + $sql .= ' user_id = ' . intval($user_id) . ' AND '; + $sql .= ' image_id = ' . intval($image_id); + + $result = $xoopsDB->query($sql); + + return $xoopsDB->fetchArray($result); +} + +function spicky_add_bookmark($image_id, $user_id) +{ + global $xoopsDB; + global $mydirname; + + $sql = 'INSERT INTO ' . $xoopsDB->prefix($mydirname . '_bookmark'); + $sql .= ' ( '; + $sql .= 'user_id, image_id, reg_time, reg_user ) VALUES ( '; + $sql .= intval($user_id) . ', '; + $sql .= intval($image_id) . ', '; + $sql .= time() . ', '; + $sql .= intval($user_id) . ' '; + $sql .= ' ) '; + + $result = $xoopsDB->queryF($sql); + + return mysql_insert_id(); +} + +function spicky_delete_bookmark($bookmark_id) +{ + global $xoopsDB; + global $mydirname; + + $sql = 'DELETE FROM ' . $xoopsDB->prefix($mydirname . '_bookmark'); + $sql .= ' WHERE id = ' . intval($bookmark_id); + + return $xoopsDB->queryF($sql); +} + + Modified: spicky/trunc/xoops_trust_path/modules/spicky/language/japanese/main.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/language/japanese/main.php 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/language/japanese/main.php 2009-08-28 01:20:28 UTC (rev 36) @@ -85,4 +85,13 @@ define('_MD_SPICKY_PAINT_FROM_THIS_IMAGE', 'この画像にお絵かきした画像'); define('_MD_SPICKY_FROM_IMAGE', '元画像'); +define('_MD_SPICKY_BOOKMARK_THIS_IMAGE', 'この画像をお気に入り登録する'); +define('_MD_SPICKY_BOOKMARK_EXISTS', 'お気に入り登録済み'); +define('_MD_SPICKY_ADDED_BOOKAMRK', 'お気に入り登録しました'); +define('_MD_SPICKY_YOUR_BOOKMARK', 'あなたのお気に入り'); +define('_MD_SPICKY_BOOKMARK_TO_DELETE', 'チェックしたお気に入りを削除'); +define('_MD_SPICKY_DELETED_BOOKMARK', 'お気に入り登録を削除しました'); +define('_MD_SPICKY_CONFIRM_DELETE_BOOKMARK', 'チェックしたお気に入りを削除しますか?'); + + Added: spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark.php (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark.php 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,127 @@ +<?php + +require_once XOOPS_ROOT_PATH.'/header.php'; +require_once(dirname(dirname(__FILE__)) . '/constants.php'); +require_once(dirname(dirname(__FILE__)) . '/include/groupperm_function.php'); +require_once(dirname(dirname(__FILE__)) . '/include/misc.php'); +require_once(dirname(dirname(__FILE__)) . '/include/db.php'); + +$constpref = strtoupper( $mydirname ) ; + +$gperm_image_upload = spicky_checkright(constant($constpref.'_GPERM_IMAGE_UPLOAD')); +if ($gperm_image_upload == 0) { + redirect_header('index.php', 2, constants('_MD_' . strtoupper($constpref) . '_NO_RIGHT_UPLOAD')); + exit(); +} + +if (is_object($xoopsUser)) { + $user_id = $xoopsUser->getVar('uid'); +} else { + $user_id = 0; +} + +spicky_main_css($mydirname); +spicky_set_gperm(); + +$xoopsTpl->assign('mydirname', $mydirname); + +if (@$_POST['stat'] == 2) { + + $image_list = array(); + $num_list = array(); + + for ($i = 1; $i <= 500; $i++) { + if (isset($_FILES['upfile' . $i]) == false) { + continue; + } + + if (@is_readable($_FILES['upfile' . $i]['tmp_name']) == false) { + continue; + } + + $num_list[] = $i; + + $src_image = $_FILES['upfile' . $i]['tmp_name']; + $type = spicky_is_image_file($src_image); + + if ($type == 0) { + $xoopsTpl->assign('message', _MD_SPICKY_NO_IMAGE_FILE); + $xoopsOption['template_main'] = $mydirname.'_upload.html'; + require_once XOOPS_ROOT_PATH.'/footer.php'; + exit(); + } + + $size = getimagesize($src_image); + $width = $size[0]; + $height = $size[1]; + + $ext = $spicky_image_ext[$type]; + + $code = spicky_get_randam_code(); + $image_id = spicky_insert_image_tmp(_MD_SPICKY_NO_TITLE, $code, $width, $height, $type, $user_id); + + $dest_dir = spicky_mkdir_p_number($image_id, 1); + $dest_file = $dest_dir . '/' . $image_id . '_' . $code . '.' . $ext; + + move_uploaded_file($src_image, $dest_file); + spicky_upload_image_resize_regular($type, $dest_file); + + $image[$i] = array('id' => $image_id, 'width' => $width, 'height' => $height, + 'code' => $code, 'size' => 120, 'type' => $type, 'ext' => $ext); + } + + $tool_list = spicky_get_tool_list(); + + $xoopsTpl->assign('num_list', $num_list); + + $xoopsTpl->assign('image', $image); + + $xoopsTpl->assign('tool_list', $tool_list); + $xoopsTpl->assign('mydirname', $mydirname); + $xoopsTpl->assign('mytrustdirname', $mytrustdirname); + $xoopsTpl->assign(array('image_id' => $image_id, 'code' => $code, 'ext' => $spicky_image_ext[$type])); + $xoopsOption['template_main'] = $mydirname.'_upload2.html'; +} else if (@$_POST['stat'] == 3) { + + for ($i = 1; $i <= 500; $i++) { + if (isset($_POST['image_id' . $i]) == false) { + continue; + } + + $tool_check = array(); + for ($j=1; $j < 1000; $j++) { + if (isset($_POST['tool' . $i . '_' . $j])) { + $tool_check[] = $j; + } + } + + $tag_list = split(' ', $_POST['tag' . $i]); + + $image = spicky_get_image_tmp($_POST['image_id' . $i]); + + $image_id = spicky_insert_image($image['title'], $image['code'], $image['width'], $image['height'], $image['type'], $user_id); + + foreach ($tag_list as $tag_name) { + if ($tag_name != '') { + spicky_add_tag_to_image($image_id, $tag_name, $user_id); + } + } + + spicky_insert_tool_image_link($image_id, $tool_check); + + spicky_update_image($image_id, $_POST['title' . $i], $_POST['desc' . $i], + $_POST['public_level' . $i], @$_POST['pasteok' . $i], @$_POST['limit_level' . $i], $user_id); + + spicky_move_tmp_to_image($_POST['image_id' . $i], $image_id, $image['code'], $image['type']); + } + + redirect_header('index.php', 2, _MD_SPICKY_ENTRYED_IMAGE); + exit(); +} else { + $image = spicky_get_image($_GET['id']); + $xoopsTpl->assign('image', $image); + $xoopsOption['template_main'] = $mydirname.'_bookmark.html'; +} + +require_once XOOPS_ROOT_PATH.'/footer.php'; + Added: spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_add.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_add.php (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_add.php 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,33 @@ +<?php + +require_once XOOPS_ROOT_PATH . '/header.php'; +require_once dirname(dirname(__FILE__)) . '/include/db.php'; + +header('Content-type: text/html; charset=' . _CHARSET); + +$image = spicky_get_image(@$_GET['image_id']); + +if ($image == false) { + print 'image data not found '; + exit(); +} + +if (is_object($xoopsUser)) { + $user_id = $xoopsUser->getVar('uid'); +} else { + $user_id = 0; +} + +$bookmark = spicky_get_bookmark_by_image_id($_GET['image_id'], $user_id); +print_r($bookmark); +if (@$bookmark != false) { + print _MD_SPICKY_BOOKMARK_EXISTS; + exit(); +} + +spicky_add_bookmark($_GET['image_id'], $user_id); + +print _MD_SPICKY_ADDED_BOOKAMRK; + +exit(); + Added: spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage.php (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage.php 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,53 @@ +<?php + +require_once XOOPS_ROOT_PATH.'/header.php'; +require_once(dirname(dirname(__FILE__)) . '/include/groupperm_function.php'); +require_once(dirname(dirname(__FILE__)) . '/include/misc.php'); +require_once(dirname(dirname(__FILE__)) . '/include/db.php'); +require_once(dirname(dirname(__FILE__)) . '/include/pagenavi.class.php'); + +$constpref = strtoupper( $mydirname ) ; + +spicky_main_css($mydirname); + +$total = spicky_get_image_count(); + +if (is_object($xoopsUser)) { + $user_id = $xoopsUser->getVar('uid'); +} else { + $user_id = 0; +} + +$bookmark_list = spicky_get_bookmark_list($user_id, 0, $xoopsModuleConfig['num_of_thumb']); +$bookmark_total = spicky_get_bookmark_count($user_id); + + + +// --- PageNavi --- +$url_option = 'page=bookmark_manage'; +$pos = empty( $_GET['offset'] ) ? 0 : intval( $_GET['offset'] ); +if( $pos >= $bookmark_total ) $pos = 0; +if( $bookmark_total > $xoopsModuleConfig['num_of_thumb'] ) { + include_once( XOOPS_ROOT_PATH . '/class/pagenav.php' ) ; + $navi = new XoopsPageNav( $total , $xoopsModuleConfig['num_of_thumb'] , $pos , 'offset' , $url_option ) ; + $navi_html = $navi->renderNav( 10 ) ; + $xoopsTpl->assign( 'navidisp' , true ) ; + $xoopsTpl->assign( 'navi_block' , $navi_html ) ; +} else { + $xoopsTpl->assign( 'navidisp' , false ) ; +} +// --- PageNavi --- + +spicky_set_gperm(); + +$xoopsTpl->assign('bookmark_list', $bookmark_list); +$xoopsTpl->assign('bookmark_total', $bookmark_total); + +$xoopsTpl->assign('size_of_thumb', $xoopsModuleConfig['size_of_thumb']); + +$xoopsTpl->assign('mydirname', $mydirname); + +$xoopsOption['template_main'] = $mydirname.'_bookmark_manage.html'; + +require_once XOOPS_ROOT_PATH.'/footer.php'; + Added: spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage_delete.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage_delete.php (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/main/bookmark_manage_delete.php 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,15 @@ +<?php + +require_once XOOPS_ROOT_PATH.'/header.php'; +require_once(dirname(dirname(__FILE__)) . '/include/groupperm_function.php'); +require_once(dirname(dirname(__FILE__)) . '/include/misc.php'); +require_once(dirname(dirname(__FILE__)) . '/include/db.php'); +require_once(dirname(dirname(__FILE__)) . '/include/pagenavi.class.php'); + +foreach ($_POST['bookmark_id'] as $id) { + spicky_delete_bookmark($id); +} + +redirect_header('index.php?page=bookmark_manage', 2, _MD_SPICKY_DELETED_BOOKMARK); +exit(); + Modified: spicky/trunc/xoops_trust_path/modules/spicky/main/image.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/main/image.php 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/main/image.php 2009-08-28 01:20:28 UTC (rev 36) @@ -55,6 +55,18 @@ $paint_list = spicky_get_image_where('paint_from_id = ' . intval($image['id']), 0, 3); +if (is_object($xoopsUser)) { + $user_id = $xoopsUser->getVar('uid'); +} else { + $user_id = 0; +} + +//$bookmark = spicky_get_bookmark_by_image_id($image['id'], $user_id); +//print_r($bookmark);exit(); +if (@spicky_get_bookmark_by_image_id($image['id'], $user_id)) { + $xoopsTpl->assign('bookmark', 1); +} + $xoopsTpl->assign('paint_list', $paint_list); if (@$image['paint_from_id'] != '') { Modified: spicky/trunc/xoops_trust_path/modules/spicky/main/paint.php =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/main/paint.php 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/main/paint.php 2009-08-28 01:20:28 UTC (rev 36) @@ -13,6 +13,7 @@ exit(); } +spicky_main_css($mydirname); spicky_set_gperm(); $xoopsTpl->assign('mydirname', $mydirname); Modified: spicky/trunc/xoops_trust_path/modules/spicky/sql/mysql.sql =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/sql/mysql.sql 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/sql/mysql.sql 2009-08-28 01:20:28 UTC (rev 36) @@ -32,6 +32,7 @@ `desc` text default '', `type` int(1) NOT NULL, `view` int(11) NOT NULL default 0, + `bookamark` int(11) NOT NULL default 0, `paint_from_id` int(11) default NULL, `public_level` int not null default 1, `pasteok` int(1) not null default 1, @@ -102,3 +103,12 @@ PRIMARY KEY (`id`) ) TYPE=MyISAM ; +CREATE TABLE `bookmark` ( + `id` int(11) NOT NULL auto_increment, + `user_id` int(11) NOT NULL default '0', + `image_id` int(11) NOT NULL default '0', + `reg_time` int(11) NOT NULL default '0', + `reg_user` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) TYPE=MyISAM ; + Added: spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark.html =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark.html (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark.html 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,106 @@ + +<{include file="db:`$mydirname`_myhome_navi.html"}> + +<script type="text/javascript"> +<!-- + +function spicky_check(){ + var msg = ''; + +<{foreach from=$no_list item=i}> + <{if isset($image[$i]) }> + if(document.formspicky1.title<{$i}>.value == "") { + msg += '<{$smarty.const._MD_SPICKY_IMAGE}><{$i}>: <{$smarty.const._MD_SPICKY_INPUT_TITLE_NAME}>' + "\n"; + } + if((! document.formspicky1.limit_level<{$i}>[0].checked) && + (! document.formspicky1.limit_level<{$i}>[1].checked)) { + msg += '<{$smarty.const._MD_SPICKY_IMAGE}><{$i}>: <{$smarty.const._MD_SPICKY_INPUT_LIMIT}>' + "\n"; + } + <{/if}> +<{/foreach}> + + if (msg) { + alert(msg); + return false; + } else { + return true; + } +} + +// --> +</script> + + + +<h1><{$smarty.const._MD_SPICKY_ENTRY_IMAGE}></h1> + +<form action="index.php?page=upload" method="post" id="formspicky1" name="formspicky1" onSubmit="return spicky_check();"> +<input name="HypEncHint" type="hidden" value="ぷ" /> +<input name="stat" type="hidden" value="3" /> + +<{foreach from=$num_list item=i}> + +<{if isset($image[$i]) }> + +<input type="hidden" name="image_id<{$i}>" value="<{$image[$i].id}>"> + +<table class='outer' cellspacing='1' cellpadding='4'> +<tr> +<td rowspan="10" class="odd"> +<center> +<br /><br /><br /><br /><br /> +<{$smarty.const._MD_SPICKY_IMAGE}><{$i}><br /> +<{spicky_image image=$image[$i] mydirname=$mydirname tmp="1"}> +</center> +</td> +<td class="even"><{$smarty.const._MD_SPICKY_TITEL}></td> +<td class="odd"><input type="text" id="title" name="title<{$i}>" value="" size="32" maxlength="33"></td> +</tr> +<tr> +<td class="even"><{$smarty.const._MD_SPICKY_DESC}></td> +<td class="odd"><textarea name="desc<{$i}>" cols="30" rows="10"></textarea></td> +</tr> +<tr> +<td class="even"><{$smarty.const._MD_SPICKY_PUBLIC_LEVEL}></td> +<td class="odd"> +<input type="radio" name="public_level<{$i}>" value="1" checked><{$smarty.const._MD_SPICKY_PUBLIC_LEVEL_ALL}> +<input type="radio" name="public_level<{$i}>" value="2"><{$smarty.const._MD_SPICKY_PUBLIC_LEVEL_PRV}> +</td> +</tr> +<tr> +<td class="even"><{$smarty.const._MD_SPICKY_TAG}></td> +<td class="odd"><input type="text" name="tag<{$i}>" size="50" maxlength="51"><br /><{$smarty.const._MD_SPICKY_TAG_DESC}></td> +</tr> +<tr> +<td class="even"><{$smarty.const._MD_SPICKY_LIMIT_LEVEL}></td> +<td class="odd"> +<input type="radio" id="limit_level" name="limit_level<{$i}>" value="1"><{$smarty.const._MD_SPICKY_LIMIT_LEVEL_ALL}> +<input type="radio" id="limit_level" name="limit_level<{$i}>" value="2"><{$smarty.const._MD_SPICKY_LIMIT_LEVEL_R18}> +</td> +</tr> +<tr> +<td class="even"><{$smarty.const._MD_SPICKY_TOOL}></td> +<td class="odd"> +<{assign var="tmp" value="1"}> +<{foreach from=$tool_list item=item}> +<{if $tmp != $item.group}> +<hr /> +<{/if}> +<nobr><input type="checkbox" name="tool<{$i}>_<{$item.id}>"><{$item.name|escape}></nobr> +<{assign var="tmp" value=$item.group}> +<{/foreach}> +</td> +</tr> +</table> + +<{/if}> + +<{/foreach}> + +<center> +<input type="submit" name="submit" value="submit"> +<input type="reset" name="reset" value="reset"> +</center> + +</form> + Added: spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark_manage.html =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark_manage.html (rev 0) +++ spicky/trunc/xoops_trust_path/modules/spicky/templates/bookmark_manage.html 2009-08-28 01:20:28 UTC (rev 36) @@ -0,0 +1,53 @@ + +<{include file="db:`$mydirname`_myhome_navi.html"}> + +<script type="text/javascript"> +<!-- + +function spicky_check(){ + if (confirm('<{$smarty.const._MD_SPICKY_CONFIRM_DELETE_BOOKMARK}>')) { + return true; + } else { + return false; + } +} + +// --> +</script> + +<div id="spicky_pager"> +<{if $navidisp}> + <{$navi_block}> +<{/if}> +</div> + +<div><{$smarty.const._MD_SPICKY_YOUR_BOOKMARK}></div> + +<form action="index.php?page=bookmark_manage_delete" id="formspicky1" name="formspicky1" method="post" onSubmit="return spicky_check();"> +<{$smarty.const._MD_SPICKY_BOOKMARK_TO_DELETE}><input type="submit" name="submit" value="<{$smarty.const._MD_SPICKY_DELETE}>"> + +<div id="spicky_image_c<{$size_of_thumb}>_2"> +<ul> +<{foreach from=$bookmark_list item=item}> +<li><a href="index.php?page=image&id=<{$item.id}>"><{spicky_image image=$item size=$size_of_thumb} mydirname=$mydirname}></a><br /> +<input type="checkbox" name="bookmark_id[]" value="<{$item.bookmark_id}>" /><label ><{$item.title|escape|spicky_mb_truncate}></label> +<div style="line-height:18px;"> +<{$smarty.const._MD_SPICKY_VIEW}>:<{$item.view}> +</div> +</li> +<{/foreach}> +</ul> +</div> + +<div style="clear : both;"></div> + +<{$smarty.const._MD_SPICKY_BOOKMARK_TO_DELETE}><input type="submit" name="submit" value="<{$smarty.const._MD_SPICKY_DELETE}>"> +</form> + + +<div id="spicky_pager"> +<{if $navidisp}> + <{$navi_block}> +<{/if}> +</div> + Modified: spicky/trunc/xoops_trust_path/modules/spicky/templates/image.html =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/templates/image.html 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/templates/image.html 2009-08-28 01:20:28 UTC (rev 36) @@ -78,7 +78,29 @@ { var item = $('edit_form_div'); Element.update(item, req.responseText) +} + +function bookmark_add() +{ + var pars = 'page=bookmark_add&image_id=<{$image.id}>'; + var url = '<{$xoops_url}>/modules/<{$mydirname}>/index.php'; + + var myAjax = new Ajax.Request( + url, + { + method: 'get', + parameters: pars, + onComplete: bookmark_show_response + } + ); } + +function bookmark_show_response(req) +{ + var item = $('bookmark_div'); + Element.update(item, req.responseText) +} + </script> <{include file="db:`$mydirname`_myhome_navi.html"}> @@ -100,6 +122,7 @@ </div> <div><a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?page=paint&paint_from_id=<{$image.id}>"><{$smarty.const._MD_SPICKY_PAINT_THIS_IMAGE}></a></div> <div><a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?page=image_edit&id=<{$image.id}>"><{$smarty.const._MD_SPICKY_EDIT_THIS_IMAGE}></a></div> +<div id="bookmark_div"><{if $bookmark}><{$smarty.const._MD_SPICKY_BOOKMARK_EXISTS}><{else}><a href="javascript:onclick=bookmark_add();"><{$smarty.const._MD_SPICKY_BOOKMARK_THIS_IMAGE}><{/if}></a></div> <div id="spicky_image_desc"><{$image.desc|escape}></div><br /> Modified: spicky/trunc/xoops_trust_path/modules/spicky/templates/image_manage.html =================================================================== --- spicky/trunc/xoops_trust_path/modules/spicky/templates/image_manage.html 2009-08-27 22:35:01 UTC (rev 35) +++ spicky/trunc/xoops_trust_path/modules/spicky/templates/image_manage.html 2009-08-28 01:20:28 UTC (rev 36) @@ -21,6 +21,8 @@ <{/if}> </div> +<div><{$smarty.const._MD_SPICKY_IMAGE_MANAGE}></div> + <form action="index.php?page=image_manage_delete" id="formspicky1" name="formspicky1" method="post" onSubmit="return spicky_check();"> <{$smarty.const._MD_SPICKY_CHECK_TO_DELETE}><input type="submit" name="submit" value="<{$smarty.const._MD_SPICKY_DELETE}>"> @@ -40,7 +42,7 @@ <div style="clear : both;"></div> -<{$smarty.const._MD_SPICKY_CHECK_TO_DELETE}><input type="submit" name="<{$smarty.const._MD_SPICKY_DELETE}>" value="submit"> +<{$smarty.const._MD_SPICKY_CHECK_TO_DELETE}><input type="submit" name="submit" value="<{$smarty.const._MD_SPICKY_DELETE}>"> </form>