Annotation of /mambo/branches/4.6/mambots/editors/mostlyce/jscripts/tiny_mce/plugins/advlink/search.html.php
Parent Directory
|
Revision Log
Revision 332 - (view) (download)
| 1 : | cauld | 160 | <?php |
| 2 : | /** | ||
| 3 : | oziris | 332 | * @package Mambo Open Source |
| 4 : | cauld | 160 | * @subpackage Search |
| 5 : | oziris | 332 | * @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
| 6 : | cauld | 160 | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 7 : | oziris | 332 | * |
| 8 : | * Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure | ||
| 9 : | * that Mambo remained free Open Source software owned and managed by the community. | ||
| 10 : | cauld | 160 | * Mambo is Free Software |
| 11 : | */ | ||
| 12 : | |||
| 13 : | //Modified for mosCE Advanced Link Search feature - 20/02/2005 Ryan Demmer | ||
| 14 : | |||
| 15 : | /** ensure this file is being included by a parent file */ | ||
| 16 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 17 : | |||
| 18 : | /** | ||
| 19 : | * @package Mambo | ||
| 20 : | * @subpackage Search | ||
| 21 : | */ | ||
| 22 : | class search_html { | ||
| 23 : | |||
| 24 : | function openhtml( $params ) { | ||
| 25 : | if ( $params->get( 'page_title' ) ) { | ||
| 26 : | ?> | ||
| 27 : | <div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>"> | ||
| 28 : | <?php echo $params->get( 'header' ); ?> | ||
| 29 : | </div> | ||
| 30 : | <?php | ||
| 31 : | } | ||
| 32 : | } | ||
| 33 : | |||
| 34 : | function searchbox( $searchword, &$lists, $params ) { | ||
| 35 : | global $Itemid, $mosConfig_live_site; | ||
| 36 : | |||
| 37 : | $tinyMCE_URL = $mosConfig_live_site."/mambots/editors/mostlyce/jscripts/tiny_mce"; | ||
| 38 : | ?> | ||
| 39 : | <script language="javascript" type="text/javascript" src="<?php echo $tinyMCE_URL;?>/tiny_mce_popup.js"></script> | ||
| 40 : | <form action="search.php" method="post"> | ||
| 41 : | <table class="contentpaneopen<?php echo $params->get( 'pageclass_sfx' ); ?>"> | ||
| 42 : | <tr> | ||
| 43 : | <td nowrap="nowrap"> | ||
| 44 : | <?php echo _insert_link_search ?>: | ||
| 45 : | </td> | ||
| 46 : | <td nowrap="nowrap"> | ||
| 47 : | <input type="text" name="searchword"size="15" value="<?php echo stripslashes($searchword);?>" class="inputbox" /> | ||
| 48 : | </td> | ||
| 49 : | <td width="100%" nowrap="nowrap"> | ||
| 50 : | <input type="submit" name="submit" value="<?php echo _insert_link_searchTitle ?>" class="button" /> | ||
| 51 : | </td> | ||
| 52 : | </tr> | ||
| 53 : | <tr> | ||
| 54 : | <td colspan="3"> | ||
| 55 : | <?php echo $lists['searchphrase']; ?> | ||
| 56 : | </td> | ||
| 57 : | </tr> | ||
| 58 : | <tr> | ||
| 59 : | <td colspan="3"><?php echo _insert_link_searchorder ?>: <?php echo $lists['ordering'];?></td> | ||
| 60 : | </tr> | ||
| 61 : | </table> | ||
| 62 : | <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>" /> | ||
| 63 : | </form> | ||
| 64 : | <?php | ||
| 65 : | } | ||
| 66 : | |||
| 67 : | function searchintro( $searchword, $params ) { | ||
| 68 : | ?> | ||
| 69 : | <table class="searchintro<?php echo $params->get( 'pageclass_sfx' ); ?>"> | ||
| 70 : | <tr> | ||
| 71 : | <td colspan="3" align="left"><?php echo _insert_link_searchkey; | ||
| 72 : | ' <b>' . stripslashes($searchword) . '</b>'; ?> | ||
| 73 : | <?php | ||
| 74 : | } | ||
| 75 : | |||
| 76 : | function message( $message, $params ) { | ||
| 77 : | ?> | ||
| 78 : | <table class="searchintro<?php echo $params->get( 'pageclass_sfx' ); ?>"> | ||
| 79 : | <tr> | ||
| 80 : | <td colspan="3" align="left"> | ||
| 81 : | <?php eval ('echo "'.$message.'";'); ?> | ||
| 82 : | </td> | ||
| 83 : | </tr> | ||
| 84 : | </table> | ||
| 85 : | <?php | ||
| 86 : | } | ||
| 87 : | |||
| 88 : | function displaynoresult() { | ||
| 89 : | ?> | ||
| 90 : | </td> | ||
| 91 : | </tr> | ||
| 92 : | <?php | ||
| 93 : | } | ||
| 94 : | |||
| 95 : | function display( &$rows, $params ) { | ||
| 96 : | global $mosConfig_offset, $mosConfig_live_site; | ||
| 97 : | |||
| 98 : | $c = count ($rows); | ||
| 99 : | $tabclass = array("sectiontableentry1", "sectiontableentry2"); | ||
| 100 : | $k = 0; | ||
| 101 : | |||
| 102 : | // number of matches found | ||
| 103 : | printf( _SEARCH_MATCHES, $c ); | ||
| 104 : | ?> | ||
| 105 : | </td> | ||
| 106 : | </tr> | ||
| 107 : | </table> | ||
| 108 : | <br /> | ||
| 109 : | <table class="contentpaneopen<?php echo $params->get( 'pageclass_sfx' ); ?>"> | ||
| 110 : | <?php | ||
| 111 : | foreach ($rows as $row) { | ||
| 112 : | if ($row->created) { | ||
| 113 : | $created = mosFormatDate ($row->created, '%d %B, %Y'); | ||
| 114 : | } else { | ||
| 115 : | $created = ''; | ||
| 116 : | } | ||
| 117 : | ?> | ||
| 118 : | <tr> | ||
| 119 : | <td> | ||
| 120 : | <?php | ||
| 121 : | if ( strstr( $row->href, 'http://' ) ) { | ||
| 122 : | $href = $row->href; | ||
| 123 : | }else{ | ||
| 124 : | $href = "$mosConfig_live_site/".$row->href; | ||
| 125 : | } | ||
| 126 : | |||
| 127 : | $title = $row->title; | ||
| 128 : | $section = $row->section; | ||
| 129 : | $text = $row->text; | ||
| 130 : | ?> | ||
| 131 : | <a href="javascript:;" onClick="SearchLink('<?php echo $href; ?>');"> | ||
| 132 : | <?php | ||
| 133 : | echo $title; | ||
| 134 : | ?> | ||
| 135 : | </a> | ||
| 136 : | (<?php echo $section; ?>) | ||
| 137 : | </td> | ||
| 138 : | </tr> | ||
| 139 : | <tr> | ||
| 140 : | <td> | ||
| 141 : | <?php echo $text;?> … | ||
| 142 : | </td> | ||
| 143 : | </tr> | ||
| 144 : | <tr> | ||
| 145 : | <td> | ||
| 146 : | <?php echo $created; ?> | ||
| 147 : | </td> | ||
| 148 : | </tr> | ||
| 149 : | <tr> | ||
| 150 : | <td> | ||
| 151 : | | ||
| 152 : | </td> | ||
| 153 : | </tr> | ||
| 154 : | <?php | ||
| 155 : | $k = 1 - $k; | ||
| 156 : | } | ||
| 157 : | } | ||
| 158 : | |||
| 159 : | } | ||
| 160 : | ?> | ||
| 161 : | |||
| 162 : | <head> | ||
| 163 : | <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 164 : | <script language="javascript" type="text/javascript" src="link.js"></script> | ||
| 165 : | </head> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

