2 /////////////////////////////////////////////////
3 // PukiWiki - Yet another WikiWikiWeb clone.
5 // $Id: yetlist.inc.php,v 1.15 2003/03/15 11:39:04 panda Exp $
8 function plugin_yetlist_init()
13 '_title_yetlist' => '̤ºîÀ®¤Î¥Ú¡¼¥¸°ìÍ÷'
19 '_title_yetlist' => 'List of pages, are not made yet'
22 set_plugin_messages($messages);
24 function plugin_yetlist_action()
27 global $_title_yetlist;
29 $ret['msg'] = $_title_yetlist;
33 $exists = get_existpages();
34 if (defined('LINK_DB'))
37 SELECT DISTINCT page.name,refpage.name AS refer
39 LEFT JOIN link ON page.id = ref_id
40 LEFT JOIN page AS refpage ON page_id = refpage.id
43 $rows = db_query($sql);
44 foreach ($rows as $row)
46 $refer[$row['name']][] = $row['refer'];
51 $pages = array_diff(get_existpages(CACHE_DIR,'.ref'),get_existpages());
52 foreach ($pages as $page)
54 foreach (file(CACHE_DIR.encode($page).'.ref') as $line)
56 list($_page) = explode("\t",$line);
57 $refer[$page][] = $_page;
62 if (count($refer) == 0)
67 ksort($refer,SORT_STRING);
69 foreach($refer as $page=>$refs)
71 $r_page = rawurlencode($page);
72 $s_page = htmlspecialchars($page);
75 foreach(array_unique($refs) as $_refer)
77 $r_refer = rawurlencode($_refer);
78 $s_refer = htmlspecialchars($_refer);
80 $link_refs[] = "<a href=\"$script?$r_refer\">$s_refer</a>";
82 $link_ref = join(' ',$link_refs);
83 // »²¾È¸µ¥Ú¡¼¥¸¤¬Ê£¿ô¤¢¤Ã¤¿¾ì¹ç¡¢refer¤ÏºÇ¸å¤Î¥Ú¡¼¥¸¤ò»Ø¤¹(¤¤¤¤¤Î¤«¤Ê)
84 $ret['body'] .= "<li><a href=\"$script?cmd=edit&page=$r_page&refer=$r_refer\">$s_page</a> <em>($link_ref)</em></li>\n";
87 if ($ret['body'] != '')
89 $ret['body'] = "<ul>\n{$ret['body']}</ul>\n";