Version Notes
fixed some bugs
Download this release
Release Info
Developer | wwjw |
Extension | wwjw_links |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.1.0
- app/code/local/App/Searchlinks/Block/Template.php +0 -155
- app/code/local/App/Searchlinks/Model/Observer.php +0 -27
- app/code/local/App/Searchlinks/controllers/IndexController.php +0 -34
- app/code/local/App/Searchlinks/etc/config.xml +0 -28
- app/code/local/Wwjw/Links/Block/Adminhtml/System/Config/Fieldset/Hint.php +98 -0
- app/code/local/Wwjw/Links/Block/Links.php +17 -0
- app/code/local/Wwjw/Links/Helper/Data.php +9 -0
- app/code/local/Wwjw/Links/controllers/IndexController.php +13 -0
- app/code/local/Wwjw/Links/etc/adminhtml.xml +22 -0
- app/code/local/Wwjw/Links/etc/config.xml +49 -0
- app/code/local/Wwjw/Links/etc/system.xml +63 -0
- app/design/adminhtml/default/default/template/links/hint.phtml +35 -0
- app/design/frontend/default/default/layout/links.xml +27 -0
- app/design/frontend/default/default/layout/local.xml +0 -61
- app/design/frontend/default/default/template/links/links.phtml +177 -0
- app/design/frontend/default/default/template/links/post.phtml +249 -0
- app/design/frontend/default/default/template/searchlinks/links_cpath.phtml +0 -15
- app/design/frontend/default/default/template/searchlinks/links_info.phtml +0 -6
- app/design/frontend/default/default/template/searchlinks/links_list.phtml +0 -17
- app/design/frontend/default/default/template/searchlinks/powerby.phtml +0 -3
- app/design/frontend/default/default/template/searchlinks/simple_page.phtml +0 -18
- app/etc/modules/App_Searchlinks.xml +0 -9
- app/etc/modules/Wwjw_Links.xml +9 -0
- package.xml +27 -16
app/code/local/App/Searchlinks/Block/Template.php
DELETED
@@ -1,155 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class App_Searchlinks_Block_Template extends Mage_Core_Block_Template
|
3 |
-
{
|
4 |
-
protected function _construct()
|
5 |
-
{
|
6 |
-
parent::_construct();
|
7 |
-
}
|
8 |
-
public function linksinfo()
|
9 |
-
{
|
10 |
-
// $post=$this->getRequest()->getPost();
|
11 |
-
// return $post;
|
12 |
-
}
|
13 |
-
protected function getPostPageInfo()
|
14 |
-
{
|
15 |
-
$post=$this->getRequest()->getPost();
|
16 |
-
if($post)
|
17 |
-
{
|
18 |
-
$link=trim($post['linksinfo']);
|
19 |
-
return $this->apiDataReturn(array("linkinfo"=>$link));
|
20 |
-
}
|
21 |
-
else
|
22 |
-
{
|
23 |
-
return NULL;
|
24 |
-
}
|
25 |
-
|
26 |
-
}
|
27 |
-
protected function listPageInfo()
|
28 |
-
{
|
29 |
-
$arr=$this->getRequest()->getParams();
|
30 |
-
$list=$this->apiDataReturn(array("linklist"=>"all"));
|
31 |
-
$linklist=json_decode($list,true);
|
32 |
-
return $linklist;
|
33 |
-
}
|
34 |
-
|
35 |
-
protected function cpathPageInfo()
|
36 |
-
{
|
37 |
-
$cID=$this->getRequest()->getParams();
|
38 |
-
if($cID)
|
39 |
-
{
|
40 |
-
$list=$this->apiDataReturn(array("cID"=>$cID['cID'],"size"=>$cID['size'],"order"=>$cID['order']));
|
41 |
-
return $list;
|
42 |
-
}
|
43 |
-
}
|
44 |
-
public function apiDataReturn($param)
|
45 |
-
{
|
46 |
-
if($param=='')
|
47 |
-
{
|
48 |
-
return 'Missing Parameters';
|
49 |
-
}
|
50 |
-
else
|
51 |
-
{
|
52 |
-
|
53 |
-
$contents="";
|
54 |
-
$par = "";
|
55 |
-
foreach($param as $key=>$val)
|
56 |
-
{
|
57 |
-
$par .=$key."=".$val."&";
|
58 |
-
}
|
59 |
-
|
60 |
-
$fp=fopen("http://www.wwjw.com/interface_api.php?".$par,"r");
|
61 |
-
while(!feof($fp))
|
62 |
-
{
|
63 |
-
$contents .=fgets($fp);
|
64 |
-
}
|
65 |
-
fclose($fp);
|
66 |
-
return $contents;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
protected function getOrderUrl($order)
|
70 |
-
{
|
71 |
-
$by=$this->getRequest()->getParams();
|
72 |
-
if($by)
|
73 |
-
{
|
74 |
-
return $this->getUrl('wwjw_links/index/cpath/',array("size"=>$by['size'],"cID"=>$by['cID'],"order"=>$order));
|
75 |
-
}
|
76 |
-
}
|
77 |
-
public function getStyle($case)
|
78 |
-
{
|
79 |
-
$col=$this->getRequest()->getParams();
|
80 |
-
if($col['order']==$case)
|
81 |
-
{
|
82 |
-
return 'style="font-weight:bold; color:black;"';
|
83 |
-
}
|
84 |
-
else
|
85 |
-
{
|
86 |
-
return ;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
|
90 |
-
protected function currentPage($size=30)
|
91 |
-
{
|
92 |
-
$cID=$this->getRequest()->getParams();
|
93 |
-
if($cID)
|
94 |
-
{
|
95 |
-
|
96 |
-
$num=$this->apiDataReturn(array("page_cID"=>$cID['cID']));
|
97 |
-
$page=floor($num/$size)+1;
|
98 |
-
$href_html="";
|
99 |
-
if($cID['size']==1||$cID['size']=="")
|
100 |
-
{
|
101 |
-
$pre="";
|
102 |
-
}
|
103 |
-
else
|
104 |
-
{
|
105 |
-
$pre='<a href="'.$this->getUrl('searchlinks/index/cpath',array("size"=>$cID['size']-1,"cID"=>$cID['cID'])).'">'.'Last'.'</a>'." ";
|
106 |
-
}
|
107 |
-
$href_html .=$pre;
|
108 |
-
if($cID['size']<=$page-4)
|
109 |
-
{
|
110 |
-
$pip=$cID['size'];
|
111 |
-
$ini=$pip+4;
|
112 |
-
}
|
113 |
-
else
|
114 |
-
{
|
115 |
-
$ini=$page;
|
116 |
-
$pip=$cID['size'];
|
117 |
-
}
|
118 |
-
|
119 |
-
for($i=$pip;$i<=$ini;$i++)
|
120 |
-
{
|
121 |
-
if($i==$cID['size'])
|
122 |
-
{
|
123 |
-
$href_html .='<b>'.$cID['size'].'</b>'." ";
|
124 |
-
}
|
125 |
-
else
|
126 |
-
{
|
127 |
-
$href_html .='<a style="" href="'.$this->getUrl('searchlinks/index/cpath',array("size"=>$i,"cID"=>$cID['cID'])).'">'.$i.'</a>'." ";
|
128 |
-
}
|
129 |
-
|
130 |
-
}
|
131 |
-
if($cID['size']==$page)
|
132 |
-
{
|
133 |
-
$next=$page;
|
134 |
-
}
|
135 |
-
else
|
136 |
-
{
|
137 |
-
$next=$cID['size']+1;
|
138 |
-
}
|
139 |
-
$href_html .=" ".'<a href="'.$this->getUrl('searchlinks/index/cpath',array("size"=>$next,"cID"=>$cID['cID'])).'">'.'Next'.'</a>'." ";
|
140 |
-
return $href_html;
|
141 |
-
}
|
142 |
-
else
|
143 |
-
{
|
144 |
-
return NULL;
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
public function errorMessage()
|
149 |
-
{
|
150 |
-
return __('The api was connect error, please check site system file');
|
151 |
-
|
152 |
-
}
|
153 |
-
|
154 |
-
}
|
155 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/App/Searchlinks/Model/Observer.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class App_Searchlinks_Model_Observer {
|
3 |
-
const FLAG_SHOW_CONFIG = 'showConfig';
|
4 |
-
const FLAG_SHOW_CONFIG_FORMAT = 'showConfigFormat';
|
5 |
-
private $request;
|
6 |
-
public function checkForConfigRequest($observer) {
|
7 |
-
$this->request = $observer->getEvent ()->getData ( 'front' )->getRequest ();
|
8 |
-
if ($this->request->{self::FLAG_SHOW_CONFIG} === 'true') {
|
9 |
-
$this->setHeader ();
|
10 |
-
$this->outputConfig ();
|
11 |
-
}
|
12 |
-
}
|
13 |
-
private function setHeader() {
|
14 |
-
$format = isset ( $this->request->{self::FLAG_SHOW_CONFIG_FORMAT} ) ? $this->request->{self::FLAG_SHOW_CONFIG_FORMAT} : 'xml';
|
15 |
-
switch ($format) {
|
16 |
-
case 'text' :
|
17 |
-
header ( "Content-Type: text/plain" );
|
18 |
-
break;
|
19 |
-
default :
|
20 |
-
header ( "Content-Type: text/xml" );
|
21 |
-
}
|
22 |
-
}
|
23 |
-
private function outputConfig() {
|
24 |
-
die ( Mage::app ()->getConfig ()->getNode ()->asXML () );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/App/Searchlinks/controllers/IndexController.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class App_Searchlinks_IndexController extends Mage_Core_Controller_Front_Action {
|
3 |
-
public function indexAction() {
|
4 |
-
$this->loadLayout();
|
5 |
-
$this->getLayout()->getBlock('searchlinksForm')->setFormAction( Mage::getUrl('*/*/post') );
|
6 |
-
$this->renderLayout();
|
7 |
-
|
8 |
-
}
|
9 |
-
public function postAction()
|
10 |
-
{
|
11 |
-
$post=$this->getRequest()->getPost();
|
12 |
-
if($post)
|
13 |
-
{
|
14 |
-
$this->loadLayout();
|
15 |
-
$this->getLayout()->getBlock('linksinfo');
|
16 |
-
$this->renderLayout();
|
17 |
-
}
|
18 |
-
}
|
19 |
-
public function listAction()
|
20 |
-
{
|
21 |
-
$this->loadLayout();
|
22 |
-
$this->getLayout()->getBlock('linkslist');
|
23 |
-
$this->renderLayout();
|
24 |
-
}
|
25 |
-
public function cpathAction()
|
26 |
-
{
|
27 |
-
$this->loadLayout();
|
28 |
-
$this->getLayout()->getBlock('linkscpath');
|
29 |
-
$this->renderLayout();
|
30 |
-
}
|
31 |
-
|
32 |
-
}
|
33 |
-
|
34 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/App/Searchlinks/etc/config.xml
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<App_Searchlinks>
|
5 |
-
<version>0.1.0</version>
|
6 |
-
</App_Searchlinks>
|
7 |
-
</modules>
|
8 |
-
<frontend>
|
9 |
-
<routers>
|
10 |
-
<searchlinks>
|
11 |
-
<use>standard</use>
|
12 |
-
<args>
|
13 |
-
<module>App_Searchlinks</module>
|
14 |
-
<frontName>wwjw_links</frontName>
|
15 |
-
</args>
|
16 |
-
</searchlinks>
|
17 |
-
</routers>
|
18 |
-
</frontend>
|
19 |
-
<global>
|
20 |
-
<blocks>
|
21 |
-
<searchlinks>
|
22 |
-
<class>App_Searchlinks_Block</class>
|
23 |
-
</searchlinks>
|
24 |
-
</blocks>
|
25 |
-
|
26 |
-
</global>
|
27 |
-
|
28 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wwjw/Links/Block/Adminhtml/System/Config/Fieldset/Hint.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Paypal
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Renderer for PayPal banner in System Configuration
|
30 |
+
*
|
31 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
32 |
+
*/
|
33 |
+
class Wwjw_Links_Block_Adminhtml_System_Config_Fieldset_Hint
|
34 |
+
extends Mage_Adminhtml_Block_Abstract
|
35 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
36 |
+
{
|
37 |
+
protected $_template = 'links/hint.phtml';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Render fieldset html
|
41 |
+
*
|
42 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
46 |
+
{
|
47 |
+
$elementOriginalData = $element->getOriginalData();
|
48 |
+
if (isset($elementOriginalData['help_link'])) {
|
49 |
+
$this->setHelpLink($elementOriginalData['help_link']);
|
50 |
+
}
|
51 |
+
$js = '
|
52 |
+
paypalToggleSolution = function(id, url) {
|
53 |
+
var doScroll = false;
|
54 |
+
Fieldset.toggleCollapse(id, url);
|
55 |
+
if ($(this).hasClassName("open")) {
|
56 |
+
$$(".with-button button.button").each(function(anotherButton) {
|
57 |
+
if (anotherButton != this && $(anotherButton).hasClassName("open")) {
|
58 |
+
$(anotherButton).click();
|
59 |
+
doScroll = true;
|
60 |
+
}
|
61 |
+
}.bind(this));
|
62 |
+
}
|
63 |
+
if (doScroll) {
|
64 |
+
var pos = Element.cumulativeOffset($(this));
|
65 |
+
window.scrollTo(pos[0], pos[1] - 45);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
togglePaypalSolutionConfigureButton = function(button, enable) {
|
70 |
+
var $button = $(button);
|
71 |
+
$button.disabled = !enable;
|
72 |
+
if ($button.hasClassName("disabled") && enable) {
|
73 |
+
$button.removeClassName("disabled");
|
74 |
+
} else if (!$button.hasClassName("disabled") && !enable) {
|
75 |
+
$button.addClassName("disabled");
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
// check store-view disabling Express Checkout
|
80 |
+
document.observe("dom:loaded", function() {
|
81 |
+
var ecButton = $$(".pp-method-express button.button")[0];
|
82 |
+
var ecEnabler = $$(".paypal-ec-enabler")[0];
|
83 |
+
if (typeof ecButton == "undefined" || typeof ecEnabler != "undefined") {
|
84 |
+
return;
|
85 |
+
}
|
86 |
+
var $ecButton = $(ecButton);
|
87 |
+
$$(".with-button button.button").each(function(configureButton) {
|
88 |
+
if (configureButton != ecButton && !configureButton.disabled
|
89 |
+
&& !$(configureButton).hasClassName("paypal-ec-separate")
|
90 |
+
) {
|
91 |
+
togglePaypalSolutionConfigureButton(ecButton, false);
|
92 |
+
}
|
93 |
+
});
|
94 |
+
});
|
95 |
+
';
|
96 |
+
return $this->toHtml() . $this->helper('adminhtml/js')->getScript($js);
|
97 |
+
}
|
98 |
+
}
|
app/code/local/Wwjw/Links/Block/Links.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Wwjw_Links_Block_Links extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
public function _prepareLayout()
|
5 |
+
{
|
6 |
+
return parent::_prepareLayout();
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getLinks()
|
10 |
+
{
|
11 |
+
if (!$this->hasData('links')) {
|
12 |
+
$this->setData('links', Mage::registry('links'));
|
13 |
+
}
|
14 |
+
return $this->getData('links');
|
15 |
+
|
16 |
+
}
|
17 |
+
}
|
app/code/local/Wwjw/Links/Helper/Data.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Wwjw_Links_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
public function getLinkUrl()
|
6 |
+
{
|
7 |
+
return $this->_getUrl('wwjw_links/index/index');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Wwjw/Links/controllers/IndexController.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Wwjw_Links_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->renderLayout();
|
8 |
+
}
|
9 |
+
public function postAction(){
|
10 |
+
$this->loadLayout();
|
11 |
+
$this->renderLayout();
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Wwjw/Links/etc/adminhtml.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<wwjwlinks translate="title" module="links">
|
12 |
+
<title>Wwjw Settings</title>
|
13 |
+
</wwjwlinks>
|
14 |
+
</children>
|
15 |
+
</config>
|
16 |
+
</children>
|
17 |
+
</system>
|
18 |
+
</children>
|
19 |
+
</admin>
|
20 |
+
</resources>
|
21 |
+
</acl>
|
22 |
+
</config>
|
app/code/local/Wwjw/Links/etc/config.xml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Wwjw_Links>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Wwjw_Links>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<links>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Wwjw_Links</module>
|
14 |
+
<frontName>wwjw_links</frontName>
|
15 |
+
</args>
|
16 |
+
</links>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<links>
|
21 |
+
<file>links.xml</file>
|
22 |
+
</links>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<links>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Wwjw_Links</module>
|
32 |
+
<frontName>links</frontName>
|
33 |
+
</args>
|
34 |
+
</links>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<global>
|
38 |
+
<blocks>
|
39 |
+
<links>
|
40 |
+
<class>Wwjw_Links_Block</class>
|
41 |
+
</links>
|
42 |
+
</blocks>
|
43 |
+
<helpers>
|
44 |
+
<links>
|
45 |
+
<class>Wwjw_Links_Helper</class>
|
46 |
+
</links>
|
47 |
+
</helpers>
|
48 |
+
</global>
|
49 |
+
</config>
|
app/code/local/Wwjw/Links/etc/system.xml
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<wwjwtab translate="label" module="links">
|
5 |
+
<label>WWJW Api Setting</label>
|
6 |
+
<sort_order>300</sort_order>
|
7 |
+
</wwjwtab>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<wwjwlinks translate="label" module="links">
|
11 |
+
<label>Wwjw link Exchange</label>
|
12 |
+
<tab>wwjwtab</tab>
|
13 |
+
<sort_order>340</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<groups>
|
18 |
+
<paypal_notice translate="label" module="paypal">
|
19 |
+
<frontend_model>links/adminhtml_system_config_fieldset_hint</frontend_model>
|
20 |
+
<help_link>https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup</help_link>
|
21 |
+
<sort_order>0</sort_order>
|
22 |
+
<show_in_default>1</show_in_default>
|
23 |
+
<show_in_website>1</show_in_website>
|
24 |
+
<show_in_store>1</show_in_store>
|
25 |
+
</paypal_notice>
|
26 |
+
<wwjwsettings translate="label">
|
27 |
+
<label>Wwjw link Exchange</label>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>50</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
<fields>
|
34 |
+
<wwjw_userid translate="label">
|
35 |
+
<label>Wwjw User Id </label>
|
36 |
+
<frontend_type>text</frontend_type>
|
37 |
+
<sort_order>10</sort_order>
|
38 |
+
<show_in_default>1</show_in_default>
|
39 |
+
<show_in_website>1</show_in_website>
|
40 |
+
<show_in_store>0</show_in_store>
|
41 |
+
</wwjw_userid>
|
42 |
+
<wwjw_key translate="label">
|
43 |
+
<label>Wwjw Consumer Key </label>
|
44 |
+
<frontend_type>text</frontend_type>
|
45 |
+
<sort_order>10</sort_order>
|
46 |
+
<show_in_default>1</show_in_default>
|
47 |
+
<show_in_website>1</show_in_website>
|
48 |
+
<show_in_store>0</show_in_store>
|
49 |
+
</wwjw_key>
|
50 |
+
<wwjw_secret translate="label">
|
51 |
+
<label>Wwjw Consumer Secret</label>
|
52 |
+
<frontend_type>text</frontend_type>
|
53 |
+
<sort_order>11</sort_order>
|
54 |
+
<show_in_default>1</show_in_default>
|
55 |
+
<show_in_website>1</show_in_website>
|
56 |
+
<show_in_store>0</show_in_store>
|
57 |
+
</wwjw_secret>
|
58 |
+
</fields>
|
59 |
+
</wwjwsettings>
|
60 |
+
</groups>
|
61 |
+
</wwjwlinks>
|
62 |
+
</sections>
|
63 |
+
</config>
|
app/design/adminhtml/default/default/template/links/hint.phtml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Paypal_Block_System_Config_Fieldset_Hint
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<div class="paypal-payment-notice">
|
34 |
+
<?php echo Mage::helper('links')->__('<a href="%s" target="_blank">Submit Link</a>, <a href="%s" target="_blank">Apply Api</a>',"http://www.wwjw.com/submit.php","http://api.wwjw.com");?>
|
35 |
+
</div>
|
app/design/frontend/default/default/layout/links.xml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="top.links">
|
5 |
+
<action method="addLink" translate="label title" module="links"><label>Links</label><url helper="links/getLinkUrl"/><title>Links</title><prepare/><urlParams/><position>100</position></action>
|
6 |
+
</reference>
|
7 |
+
<reference name="footer_links">
|
8 |
+
<action method="addLink" translate="label title" module="links"><label>Links</label><url helper="links/getLinkUrl"/><title>Links</title></action>
|
9 |
+
</reference>
|
10 |
+
</default>
|
11 |
+
<links_index_index>
|
12 |
+
<reference name="root">
|
13 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
14 |
+
</reference>
|
15 |
+
<reference name="content">
|
16 |
+
<block type="links/links" name="links" template="links/links.phtml" />
|
17 |
+
</reference>
|
18 |
+
</links_index_index>
|
19 |
+
<links_index_post>
|
20 |
+
<reference name="root">
|
21 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
22 |
+
</reference>
|
23 |
+
<reference name="content">
|
24 |
+
<block type="links/links" name="links" template="links/post.phtml" />
|
25 |
+
</reference>
|
26 |
+
</links_index_post>
|
27 |
+
</layout>
|
app/design/frontend/default/default/layout/local.xml
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<default>
|
4 |
-
<reference name="root">
|
5 |
-
<reference name="top.links">
|
6 |
-
<action method="addLink" translate="label title">
|
7 |
-
<label>Link Exchange</label>
|
8 |
-
<url>wwjw_links</url>
|
9 |
-
<title>Link Exchange</title>
|
10 |
-
<prepare>true</prepare>
|
11 |
-
<liParams/>
|
12 |
-
<aParams></aParams>
|
13 |
-
<beforeText></beforeText>
|
14 |
-
<afterText></afterText>
|
15 |
-
</action>
|
16 |
-
</reference>
|
17 |
-
</reference>
|
18 |
-
</default>
|
19 |
-
|
20 |
-
<searchlinks_index_index>
|
21 |
-
<reference name="root">
|
22 |
-
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
23 |
-
</reference>
|
24 |
-
<reference name="content">
|
25 |
-
<block type="searchlinks/template" name="searchlinksForm" template="searchlinks/simple_page.phtml"/>
|
26 |
-
<block type="searchlinks/template" name="linkslist" template="searchlinks/links_list.phtml"/>
|
27 |
-
<block type="searchlinks/template" name="powerby" template="searchlinks/powerby.phtml"/>
|
28 |
-
</reference>
|
29 |
-
</searchlinks_index_index>
|
30 |
-
<searchlinks_index_post translate="label">
|
31 |
-
<reference name="root">
|
32 |
-
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
33 |
-
</reference>
|
34 |
-
<reference name="content">
|
35 |
-
<block type="searchlinks/template" name="searchlinksForm" template="searchlinks/simple_page.phtml"/>
|
36 |
-
<block type="searchlinks/template" name="linksinfo" template="searchlinks/links_info.phtml"/>
|
37 |
-
<block type="searchlinks/template" name="powerby" template="searchlinks/powerby.phtml"/>
|
38 |
-
</reference>
|
39 |
-
</searchlinks_index_post>
|
40 |
-
|
41 |
-
<searchlinks_index_list translate="label">
|
42 |
-
<reference name="root">
|
43 |
-
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
44 |
-
</reference>
|
45 |
-
<reference name="content">
|
46 |
-
<block type="searchlinks/template" name="searchlinksForm" template="searchlinks/simple_page.phtml"/>
|
47 |
-
<block type="searchlinks/template" name="linkslist" template="searchlinks/links_list.phtml"/>
|
48 |
-
<block type="searchlinks/template" name="powerby" template="searchlinks/powerby.phtml"/>
|
49 |
-
</reference>
|
50 |
-
</searchlinks_index_list>
|
51 |
-
<searchlinks_index_cpath translate="label">
|
52 |
-
<reference name="root">
|
53 |
-
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
54 |
-
</reference>
|
55 |
-
<reference name="content">
|
56 |
-
<block type="searchlinks/template" name="searchlinksForm" template="searchlinks/simple_page.phtml"/>
|
57 |
-
<block type="searchlinks/template" name="linkscpath" template="searchlinks/links_cpath.phtml"/>
|
58 |
-
<block type="searchlinks/template" name="powerby" template="searchlinks/powerby.phtml"/>
|
59 |
-
</reference>
|
60 |
-
</searchlinks_index_cpath>
|
61 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/links/links.phtml
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//define('ROOT', dirname(__FILE__).'/');
|
3 |
+
define('WWJW_HOST', 'http://api.wwjw.com/');
|
4 |
+
$config = array(
|
5 |
+
'user_id' => Mage::getStoreConfig('wwjwlinks/wwjwsettings/wwjw_userid'),
|
6 |
+
'consumer_key' => Mage::getStoreConfig('wwjwlinks/wwjwsettings/wwjw_key'),
|
7 |
+
'consumer_secret' => Mage::getStoreConfig('wwjwlinks/wwjwsettings/wwjw_secret')
|
8 |
+
);
|
9 |
+
function curlPost($url,$data)
|
10 |
+
{
|
11 |
+
try {
|
12 |
+
$ch = curl_init();
|
13 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
14 |
+
curl_setopt($ch, CURLOPT_HEADER, false);
|
15 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
16 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
17 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 2);
|
18 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
19 |
+
$data = curl_exec($ch);
|
20 |
+
curl_close($ch);
|
21 |
+
return $data;
|
22 |
+
|
23 |
+
} catch (Exception $e) {
|
24 |
+
echo $e->getMessage();
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
function sendApi()
|
30 |
+
{
|
31 |
+
global $config;
|
32 |
+
$config['domain'] = $_SERVER['HTTP_HOST'];
|
33 |
+
// $file = ROOT . 'config/send.txt';
|
34 |
+
//if (!is_file($file)) {
|
35 |
+
if (true) {
|
36 |
+
//file_put_contents($file, 1);
|
37 |
+
$sendApiUri = WWJW_HOST . "request/isuse";
|
38 |
+
$dat = http_build_query($config);
|
39 |
+
|
40 |
+
$result = curlPost($sendApiUri, $dat);
|
41 |
+
$result = json_decode($result);
|
42 |
+
if ($result->err == 0) {
|
43 |
+
return 1;
|
44 |
+
} else {
|
45 |
+
return 0;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
$dirpath = str_replace('\\', '/', dirname(__FILE__));
|
50 |
+
$REQUEST_URI = $_SERVER['REQUEST_URI'];
|
51 |
+
$URIS = explode('/', $REQUEST_URI);
|
52 |
+
|
53 |
+
$position = strpos($URIS[1], '?') ? '../' : $URIS[1];
|
54 |
+
$pos = $position == '../' ? '' : $position;
|
55 |
+
|
56 |
+
$request_uri = WWJW_HOST. 'request/cate';
|
57 |
+
$request_dat = http_build_query($config).'&domain='.$_SERVER['HTTP_HOST'].'&pos='.$pos;
|
58 |
+
$result = curlPost($request_uri, $request_dat);
|
59 |
+
$result = json_decode($result);
|
60 |
+
$type = 0;
|
61 |
+
$data = array();
|
62 |
+
if ($result->err == 0) {
|
63 |
+
$dd = sendApi();
|
64 |
+
$data = $result->msg;
|
65 |
+
foreach ((array)$data as $key=>$value) {
|
66 |
+
$data[$key] = (array)$value;
|
67 |
+
}
|
68 |
+
$type = $result->type;
|
69 |
+
} else {
|
70 |
+
|
71 |
+
}
|
72 |
+
?>
|
73 |
+
<style type="text/css">
|
74 |
+
.height1{height:7px;overflow:hidden;clear:both;}
|
75 |
+
.height2{height:9px;overflow:hidden;clear:both;}
|
76 |
+
.height3{height:10px;overflow:hidden;clear:both;}
|
77 |
+
.height4{height:15px;overflow:hidden;clear:both;}
|
78 |
+
.lay{width:900px;margin-left:auto;margin-right:auto;}
|
79 |
+
table.tabs{text-align:center;}
|
80 |
+
table.tabs tr{height:26px;}
|
81 |
+
table.tabs tr td{color:#1C75E2;}
|
82 |
+
table.tabs tr.nrs td{color:#343434;}
|
83 |
+
table.tabs tr td span{color:#FF5700;}
|
84 |
+
|
85 |
+
.nr_one{border:1px solid #DDF2FF;}
|
86 |
+
.nr_one h3{background:url(../images/bg2.gif) no-repeat;height:27px;line-height:29px;overflow:hidden;font-weight:normal;font-size:14px;color:#424242;}
|
87 |
+
.nr_one h3 span{display:block;float:left;color:#fff;width:60px;font-family:Verdana, Tahoma, Arial, sans-serif;font-size:115%;text-align:center;font-weight:bold;margin-right:20px;}
|
88 |
+
.nr_one p{padding:15px;color:#424242;line-height:1.8em;}
|
89 |
+
.nr_one p tt{color:#FF9900;}
|
90 |
+
|
91 |
+
.nr_two{border:1px solid #EFF9FF;height:1%;overflow:hidden;}
|
92 |
+
|
93 |
+
|
94 |
+
.bor_1{border:1px solid #DFF2FF;background:#F9FCFF;padding:0 10px;}
|
95 |
+
.bor_1 h3{height:39px;border-bottom:1px dashed #DBECFE;background:url(../images/ico3.gif) no-repeat;padding-left:35px;color:#1C75E2;font-size:14px;font-weight:bold;line-height:41px;overflow:hidden;}
|
96 |
+
.bor_1 ul{padding:8px 5px 8px 35px;height:1%;overflow:hidden;}
|
97 |
+
.bor_1 ul li{width:900px;float:left;}
|
98 |
+
|
99 |
+
/*copyright*/
|
100 |
+
#copyright{height:93px;border-top:1px solid #D5E0EF;padding:10px 0;text-align:center;line-height:2em;color:#979797;font-size:14px;}
|
101 |
+
#copyright a{color:#3B7BD5;}
|
102 |
+
#copyright p{color:#3B7BD5;}
|
103 |
+
#copyright span{color:#1C75E2;}
|
104 |
+
|
105 |
+
.tab_11{}
|
106 |
+
.tab_11 h4{color:#F9A911;font-size:14px;font-weight:bold;height:25px;line-height:27px;overflow:hidden;}
|
107 |
+
.tab_11 ul{margin:0;padding:0;}
|
108 |
+
.tab_11 ul li{width:220px;float:left;line-height:25px;}
|
109 |
+
.tab_11 ul li a{color:#3B7BD5;font-size:14px;}
|
110 |
+
|
111 |
+
/**/
|
112 |
+
.list_11{clear:both;background:#fff;border-top:1px solid #E1EFEF;border-bottom:1px solid #E1EFEF;}
|
113 |
+
.list_11 p{height:27px;line-height:29px;overflow:hidden;padding-left:20px;padding-right:20px;}
|
114 |
+
.list_11 p span{float:right;}
|
115 |
+
.list_11 p.a1{font-size:14px;font-weight:bold;color:#0069CA;}
|
116 |
+
.list_11 p.a1 span.c1{color:#0069CA;font-size:12px;font-family:Verdana, Tahoma, Arial, sans-serif;}
|
117 |
+
.list_11 p.a1 span.c1 b{font-size:160%;}
|
118 |
+
.list_11 p.a2{color:#555;}
|
119 |
+
.yh{display:none;}
|
120 |
+
a.links_11{display:block;height:59px;overflow:hidden;padding-top:10px;}
|
121 |
+
a.links_11:hover{background:#F7FDFD;text-decoration:none;}
|
122 |
+
.h1{height:1px;overflow:hidden;background:url(../images/h1.gif) repeat-x;}
|
123 |
+
.btn_11{display:block;float:left;background:url(../images/btn1.gif) no-repeat;width:94px;height:22px;}
|
124 |
+
.btn_12{display:block;float:left;background:url(../images/btn2.gif) no-repeat;width:94px;height:22px;}
|
125 |
+
|
126 |
+
.foot{float:left; width:100%;height:auto; position:relative }
|
127 |
+
.foot_zc{float:left; width:100%;height:auto; position:relative;}
|
128 |
+
.foot_leftbg{left:0;footer:0; background:url(../images/foot_bg1.gif) no-repeat; width:251px; height:204px; position: absolute; z-index:-1;}
|
129 |
+
.foot_rightbg{right:0;footer:0; background:url(../images/foot_bg2.gif) no-repeat; width:289px; height:204px; position:absolute; z-index:-1;}
|
130 |
+
.button {
|
131 |
+
overflow: visible;
|
132 |
+
width: auto;
|
133 |
+
border: 0;
|
134 |
+
padding: 0;
|
135 |
+
margin: 0;
|
136 |
+
cursor: pointer;
|
137 |
+
position: relative;
|
138 |
+
background: url(http://www.girlmerry.com/skin/frontend/default/se105/css/../images/sprites_repeat.gif) repeat-x 0 -300px;
|
139 |
+
height: 21px;
|
140 |
+
margin-left: 5px;
|
141 |
+
}
|
142 |
+
</style>
|
143 |
+
<div class="lay">
|
144 |
+
<p class="height4" />
|
145 |
+
<div id="path">Postion:<a href="<?php echo $this->getUrl('wwjw_links/index/index');?>">Link Exchange</a>
|
146 |
+
<p class="height4" />
|
147 |
+
<div id="lays_1" class="bor_1">
|
148 |
+
<ul>
|
149 |
+
<li>
|
150 |
+
<div class="tab_11">
|
151 |
+
<p class="height4" />
|
152 |
+
<h5>
|
153 |
+
<form action="<?php echo $this->getUrl('wwjw_links/index/post');?>" method="GET">
|
154 |
+
Search Links:<input type="text" name="TITLE" size="40"/> <input type="submit" value="Search" />
|
155 |
+
<a href="http://<?php if ($type == 1) echo 'www'; else echo 'd'?>.wwjw.com/submit.php" id="add-site" target="_blank">[Add your Site] </a>
|
156 |
+
</form>
|
157 |
+
</h5>
|
158 |
+
<ul>
|
159 |
+
<?php
|
160 |
+
foreach ((array)$data as $key=>$value) {?>
|
161 |
+
<li><a href="<?php echo $this->getUrl('wwjw_links/index/post');?>?id=<?php echo $value[ID];?>&type=<?php echo $value[TYPE];?>"><?php echo $value[TITLE];?></a></li>
|
162 |
+
<?php } ?>
|
163 |
+
</ul>
|
164 |
+
</div>
|
165 |
+
</li>
|
166 |
+
</ul>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
<div style="clear: both;">
|
170 |
+
<div class="lay" id="copyright">
|
171 |
+
<p><a href="/">Home</a> | <a target="_blank" href="http://e.wwjw.com">Package Tracking</a></p>
|
172 |
+
<p>Copyright © 2004-2013 Powered by <a target="_blank" href="http://www.wwjw.com">WWJW</a></p>
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
|
177 |
+
|
app/design/frontend/default/default/template/links/post.phtml
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//define('ROOT', dirname(__FILE__).'/');
|
3 |
+
define('WWJW_HOST', 'http://api.wwjw.com/');
|
4 |
+
$config = array(
|
5 |
+
'user_id' => Mage::getStoreConfig('wwjwlinks/wwjwsettings/wwjw_userid'),
|
6 |
+
'consumer_key' => Mage::getStoreConfig('wwjwlinks/wwjwsettings/wwjw_key'),
|
7 |
+
'consumer_secret' => Mage::getStoreConfig('wwjwlinks/wwjwsettings/wwjw_secret')
|
8 |
+
);
|
9 |
+
function curlPost($url,$data)
|
10 |
+
{
|
11 |
+
$ch = curl_init();
|
12 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
13 |
+
curl_setopt($ch, CURLOPT_HEADER, false);
|
14 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
15 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
16 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 2);
|
17 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
18 |
+
$data = curl_exec($ch);
|
19 |
+
curl_close($ch);
|
20 |
+
return $data;
|
21 |
+
}
|
22 |
+
|
23 |
+
function sendApi()
|
24 |
+
{
|
25 |
+
global $config;
|
26 |
+
$config['domain'] = $_SERVER['HTTP_HOST'];
|
27 |
+
//$file = ROOT . 'config/send.txt';
|
28 |
+
//if (!is_file($file)) {
|
29 |
+
if (true) {
|
30 |
+
//file_put_contents($file, 1);
|
31 |
+
$sendApiUri = WWJW_HOST . "request/isuse";
|
32 |
+
$dat = http_build_query($config);
|
33 |
+
|
34 |
+
$result = curlPost($sendApiUri, $dat);
|
35 |
+
$result = json_decode($result);
|
36 |
+
if ($result->err == 0) {
|
37 |
+
return 1;
|
38 |
+
} else {
|
39 |
+
return 0;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
function page($num, $perpage, $curpage, $operation) {
|
44 |
+
global $setting;
|
45 |
+
$multipage = '';
|
46 |
+
//$operation = urlmap($operation, 2);
|
47 |
+
//$operation = SITE_URL . $setting['seo_prefix'] . $operation . '/';
|
48 |
+
//$operation = SITE_URL . $setting['seo_prefix'] . $operation . '/';
|
49 |
+
//('admin' == substr($operation, 0, 5)) && ( $operation = 'index.php?' . $operation . '/');
|
50 |
+
if ($num > $perpage) {
|
51 |
+
$page = 10;
|
52 |
+
$offset = 2;
|
53 |
+
$pages = @ceil($num / $perpage);
|
54 |
+
if ($page > $pages) {
|
55 |
+
$from = 1;
|
56 |
+
$to = $pages;
|
57 |
+
} else {
|
58 |
+
$from = $curpage - $offset;
|
59 |
+
$to = $from + $page - 1;
|
60 |
+
if ($from < 1) {
|
61 |
+
$to = $curpage + 1 - $from;
|
62 |
+
$from = 1;
|
63 |
+
if ($to - $from < $page) {
|
64 |
+
$to = $page;
|
65 |
+
}
|
66 |
+
} elseif ($to > $pages) {
|
67 |
+
$from = $pages - $page + 1;
|
68 |
+
$to = $pages;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
$multipage = ($curpage - $offset > 1 && $pages > $page ? '<a href="' . $operation . '1' . $setting['seo_suffix'] . '" >Home</a>' . "\n" : '') .
|
72 |
+
($curpage > 1 ? '<a href="' . $operation . ($curpage - 1) . $setting['seo_suffix'] . '" >Previous</a>' . "\n" : '');
|
73 |
+
for ($i = $from; $i <= $to; $i++) {
|
74 |
+
$multipage .= $i == $curpage ? "<a target=\"_self\" onclick=\"javascript:void(0);\"><span class='current'>$i</span></a>\n" :
|
75 |
+
'<a href="' . $operation . $i . $setting['seo_suffix'] . '">' . $i . '</a>' . "\n";
|
76 |
+
}
|
77 |
+
$multipage .= ( $curpage < $pages ? '<a href="' . $operation . ($curpage + 1) . $setting['seo_suffix'] . '">Next</a>' . "\n" : '') .
|
78 |
+
($to < $pages ? '<a href="' . $operation . $pages . $setting['seo_suffix'] . '" >Last</a>' . "\n" : '');
|
79 |
+
}
|
80 |
+
return $multipage;
|
81 |
+
}
|
82 |
+
|
83 |
+
$id = intval($_GET['id']);
|
84 |
+
$title = $_GET['TITLE'];
|
85 |
+
$page = intval($_GET['page']) ? intval($_GET['page']) : 1;
|
86 |
+
$type = intval($_GET['type']);
|
87 |
+
$sort = $_GET['sort'];
|
88 |
+
if (!in_array($sort, array('P', 'H', 'L'))) {
|
89 |
+
$sort = 'H';
|
90 |
+
}
|
91 |
+
if (!in_array($type, array(1,2))) {
|
92 |
+
$type = 1;
|
93 |
+
}
|
94 |
+
$dirpath = str_replace('\\', '/', dirname(__FILE__));
|
95 |
+
$REQUEST_URI = $_SERVER['REQUEST_URI'];
|
96 |
+
$URIS = explode('/', $REQUEST_URI);
|
97 |
+
|
98 |
+
$position = strpos($URIS[1], '?') ? '../' : $URIS[1];
|
99 |
+
$pos = $position == '../' ? '' : $position;
|
100 |
+
|
101 |
+
if ($id > 0 || $title) {
|
102 |
+
$request_uri = WWJW_HOST . 'request/links';
|
103 |
+
$request_dat = http_build_query($config);
|
104 |
+
$request_dat .= "&id=$id&page=$page&sort=$sort&title=$title&type=$type".'&domain='.$_SERVER['HTTP_HOST'].'&pos='.$pos;
|
105 |
+
$result = curlPost($request_uri, $request_dat);
|
106 |
+
$result = json_decode($result);
|
107 |
+
$perpage = $result->perpage;
|
108 |
+
$count = $result->count;
|
109 |
+
$cateurl = $this->getUrl('wwjw_links/index/post');
|
110 |
+
$pages = page($count, $perpage, $page, "{$cateurl}?id=$id&TITLE=$title&sort=$sort&type=$type&page=");
|
111 |
+
if ($result->err == 0) {
|
112 |
+
$type = $result->type;
|
113 |
+
sendApi();
|
114 |
+
$data = $result->msg;
|
115 |
+
foreach ((array)$data as $key=>$value) {
|
116 |
+
$data[$key] = (array)$value;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
?>
|
121 |
+
<style type="text/css">
|
122 |
+
.height1{height:7px;overflow:hidden;clear:both;}
|
123 |
+
.height2{height:9px;overflow:hidden;clear:both;}
|
124 |
+
.height3{height:10px;overflow:hidden;clear:both;}
|
125 |
+
.height4{height:15px;overflow:hidden;clear:both;}
|
126 |
+
.lay{width:900px;margin-left:auto;margin-right:auto;}
|
127 |
+
|
128 |
+
/*lays_1*/
|
129 |
+
#lays_1{}
|
130 |
+
.left_1{width:900px;float:left;}
|
131 |
+
.left_1_border{border:1px solid #E1F3FF;}
|
132 |
+
.right_1{width:263px;float:right;}
|
133 |
+
|
134 |
+
#copyright {
|
135 |
+
border-top: 1px solid rgb(213, 224, 239);
|
136 |
+
color: rgb(151, 151, 151);
|
137 |
+
font-size: 14px;
|
138 |
+
height: 93px;
|
139 |
+
line-height: 2em;
|
140 |
+
padding: 10px 0;
|
141 |
+
text-align: center;
|
142 |
+
}
|
143 |
+
.lay {
|
144 |
+
margin-left: auto;
|
145 |
+
margin-right: auto;
|
146 |
+
width: 900px;
|
147 |
+
}
|
148 |
+
#copyright a {
|
149 |
+
color: rgb(59, 123, 213);
|
150 |
+
}
|
151 |
+
#copyright p {
|
152 |
+
color: rgb(59, 123, 213);
|
153 |
+
}
|
154 |
+
|
155 |
+
.gg_1{border:1px solid #DFF2FF;padding:3px 6px;}
|
156 |
+
.gg_1 img{margin:3px 0;}
|
157 |
+
|
158 |
+
.tab_1{background:#F9FCFF;padding-bottom:5px;}
|
159 |
+
.tab_1 h3{height:20px;line-height:20px;overflow:hidden;padding-left:10px;padding-top:10px;margin-bottom:10px;}
|
160 |
+
|
161 |
+
.tab_1 ul.list_2 li{border-bottom:1px dashed #DEEBFE;padding-left:15px;padding-right:15px;line-height:2em;height:1%;overflow:Hidden;padding-top:10px;}
|
162 |
+
.tab_1 ul.list_2 li tt{float:right;color:#F9A911;}
|
163 |
+
.tab_1 ul.list_2 li tt.other{color:#9A9A9A;}
|
164 |
+
.tab_1 ul.list_2 li tt b{font-size:150%;font-family:Verdana, Tahoma, Arial, sans-serif;}
|
165 |
+
.tab_1 ul.list_2 li span{color:#F9A911;font-size:14px;font-weight:bold;}
|
166 |
+
|
167 |
+
DIV.quotes {
|
168 |
+
PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center;
|
169 |
+
}
|
170 |
+
DIV.quotes A {
|
171 |
+
BORDER-RIGHT: #ddd 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ddd 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #ddd 1px solid; COLOR: #aaa; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #ddd 1px solid; TEXT-DECORATION: none
|
172 |
+
}
|
173 |
+
DIV.quotes A:hover {
|
174 |
+
BORDER-RIGHT: #a0a0a0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #a0a0a0 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #a0a0a0 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #a0a0a0 1px solid
|
175 |
+
}
|
176 |
+
|
177 |
+
DIV.quotes A .current{
|
178 |
+
BORDER-RIGHT: #a0a0a0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #a0a0a0 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #a0a0a0 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #a0a0a0 1px solid;COLOR: #aaa;
|
179 |
+
}
|
180 |
+
|
181 |
+
DIV.quotes A:active {
|
182 |
+
BORDER-RIGHT: #a0a0a0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #a0a0a0 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #a0a0a0 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #a0a0a0 1px solid
|
183 |
+
}
|
184 |
+
DIV.quotes SPAN.current {
|
185 |
+
BORDER-RIGHT: #e0e0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #e0e0e0 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: #e0e0e0 1px solid; COLOR: #aaa; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #e0e0e0 1px solid; BACKGROUND-COLOR: #f0f0f0
|
186 |
+
}
|
187 |
+
DIV.quotes SPAN.disabled {
|
188 |
+
BORDER-RIGHT: #f3f3f3 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f3f3f3 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #f3f3f3 1px solid; COLOR: #ccc; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #f3f3f3 1px solid
|
189 |
+
}
|
190 |
+
</style>
|
191 |
+
<div class="lay">
|
192 |
+
<p class="height3" />
|
193 |
+
<div id="path">Position:<a href="<?php echo $this->getUrl('wwjw_links/index/index');?>">Link Exchange</a>
|
194 |
+
<p class="height3" />
|
195 |
+
<div id="lays_1">
|
196 |
+
<div class="left_1">
|
197 |
+
<p class="height3" />
|
198 |
+
<div class="tab_1 left_1_border">
|
199 |
+
<h5 style="padding-left:10px;">
|
200 |
+
<form action="<?php echo $this->getUrl('wwjw_links/index/post');?>" method="GET">
|
201 |
+
<br />
|
202 |
+
Search Links:<input type="text" name="TITLE" size="40" />
|
203 |
+
<input type="hidden" id="type" name="type" value="<?php if ($type == 1) echo 1; else echo 2?>"/>
|
204 |
+
<input type="submit" value="Search" />
|
205 |
+
<a href="http://<?php if ($type == 1) echo 'www'; else echo 'd'?>.wwjw.com/submit.php" id="add-site" target="_blank">[Add your Site] </a>
|
206 |
+
</form>
|
207 |
+
</h5>
|
208 |
+
<h3><span>Links</span></h3>
|
209 |
+
<p class="height4" />
|
210 |
+
<span style="padding-left:10px;">
|
211 |
+
Sort:
|
212 |
+
<a href="<?php echo $this->getUrl('wwjw_links/index/post');?>?id=<?php echo $id;?>&TITLE=<?php echo $title;?>&sort=P"><?php if ($sort == 'P') echo
|
213 |
+
'<strong>PR</strong>'; else echo 'PR';?></a> |
|
214 |
+
<a href="<?php echo $this->getUrl('wwjw_links/index/post');?>?id=<?php echo $id;?>&TITLE=<?php echo $title;?>&sort=H"><?php if ($sort == 'H') echo
|
215 |
+
'<strong>Hits</strong>'; else echo 'Hits';?></a> |
|
216 |
+
<a href="<?php echo $this->getUrl('wwjw_links/index/post');?>?id=<?php echo $id;?>&TITLE=<?php echo $title;?>&sort=L"><?php if ($sort == 'L') echo
|
217 |
+
'<strong>Alphabetical</strong>'; else echo 'Alphabetical';?></a>
|
218 |
+
</span>
|
219 |
+
<ul class="list_2">
|
220 |
+
|
221 |
+
<?php foreach ((array)$data as $key=>$value) { ?>
|
222 |
+
<li>
|
223 |
+
<span><a href="<?php echo $value['URL']?>" target="_blank"><?php echo $value['TITLE']?></a></span>
|
224 |
+
<br/>
|
225 |
+
<?php echo $value['DESCRIPTION']?></br>
|
226 |
+
<div id="div1" class="list_11 yh">
|
227 |
+
<div><a href="<?php if ($type == 1) echo 'http://www.wwjw.com'; else echo 'http://d.wwjw.com';?>/detail.php?id=<?php echo $value['ID']?>" target="_blank">More...</a>
|
228 |
+
Score:<?php echo $value['score']?>/5.00 PageRank: <?php if ($value['PAGERANK']) echo 0; else echo $value['PAGERANK']?> Hits:<?php echo $value['HITS'];?>
|
229 |
+
</div>
|
230 |
+
</div>
|
231 |
+
</li>
|
232 |
+
<?php } ?>
|
233 |
+
</ul>
|
234 |
+
<p class="height4 clears" />
|
235 |
+
<div class="quotes">
|
236 |
+
<?php echo $pages;?>
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
</div>
|
240 |
+
<div class="clears"></div>
|
241 |
+
</div>
|
242 |
+
</div>
|
243 |
+
<div style="clear: both;">
|
244 |
+
<div class="lay" id="copyright">
|
245 |
+
<p><a href="/">Home</a> | <a target="_blank" href="http://e.wwjw.com">Package Tracking</a></p>
|
246 |
+
<p>Copyright © 2004-2013 Powered by <a target="_blank" href="http://www.wwjw.com">WWJW</a></p>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
app/design/frontend/default/default/template/searchlinks/links_cpath.phtml
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<br style="clear:both;"/>
|
2 |
-
<br style="clear:both;"/>
|
3 |
-
<div style="margin:10px 0px;">
|
4 |
-
|
5 |
-
Order by :<a <?php echo $this->getStyle('D'); ?> href="<?php echo $this->getOrderUrl("D");?> ">Latest</a> | <a <?php echo $this->getStyle('H'); ?> href="<?php echo $this->getOrderUrl("H"); ?>">Hits</a> | <a <?php echo $this->getStyle('P'); ?> href="<?php echo $this->getOrderUrl("P"); ?>">PageRank</a> |<a <?php echo $this->getStyle('A'); ?> href="<?php echo $this->getOrderUrl("A");?> ">Alphabetical</a>
|
6 |
-
</div>
|
7 |
-
<?php
|
8 |
-
echo $this->cpathPageInfo();
|
9 |
-
?>
|
10 |
-
|
11 |
-
<div id="pagelist">
|
12 |
-
<?php
|
13 |
-
echo $this->currentPage();
|
14 |
-
?>
|
15 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/searchlinks/links_info.phtml
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
|
3 |
-
<br />
|
4 |
-
<?php
|
5 |
-
echo $this->getPostPageInfo();
|
6 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/searchlinks/links_list.phtml
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<style type="text/css">
|
2 |
-
.link-category-title{width:30%;float:left;}
|
3 |
-
</style>
|
4 |
-
|
5 |
-
<?php
|
6 |
-
$link_list=$this->listPageInfo();
|
7 |
-
?>
|
8 |
-
<br style="clear:both;"/>
|
9 |
-
<br style="clear:both;"/>
|
10 |
-
<?php
|
11 |
-
foreach($link_list as $key=>$val)
|
12 |
-
{
|
13 |
-
?>
|
14 |
-
<div class="link-category-title"><a href="<?php echo $this->getUrl('searchlinks/index/cpath',array('cID'=>$val['ID'],"size"=>1,"order"=>'D')); ?>"><?php echo $val['TITLE']; ?></a></div>
|
15 |
-
<?php
|
16 |
-
}
|
17 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/searchlinks/powerby.phtml
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<div style="width:250px;margin-top:35px;float:left;">Powered by <a href="http://www.wwjw.com">WWJW.com</a> <br />
|
2 |
-
© WWJW.com, LLC, 2003-2012
|
3 |
-
</div>
|
|
|
|
|
|
app/design/frontend/default/default/template/searchlinks/simple_page.phtml
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
2 |
-
<?php
|
3 |
-
//$this->sss();
|
4 |
-
?>
|
5 |
-
<div class="page-title">
|
6 |
-
<h1><a href="<?php echo $this->getUrl('wwjw_links/index');?>"><?php echo __('Link Exchange') ?></a></h1>
|
7 |
-
</div>
|
8 |
-
<form action="<?php echo $this->getUrl('wwjw_links/index/post'); ?>" id="searchForm" method="post">
|
9 |
-
<label for="name" class="required form-list"><?php echo __('Search Links'); ?></label>
|
10 |
-
<input name="linksinfo" id="name" title="<?php echo __('linksinfo') ?>" value="" class="input-text required-entry" type="text" />
|
11 |
-
<button type="submit" title="<?php echo __('Search') ?>" class="button"><span><span><?php echo __('Search') ?></span></span></button>
|
12 |
-
<span style="margin-left:8px;">[<a href="http://localhost/wwjw_1/submit.php" style="font-weight:bold;">Add your Site</a>]</span>
|
13 |
-
</form>
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/App_Searchlinks.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<App_Searchlinks>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>local</codePool>
|
7 |
-
</App_Searchlinks>
|
8 |
-
</modules>
|
9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Wwjw_Links.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Wwjw_Links>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Wwjw_Links>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
CHANGED
@@ -1,30 +1,41 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>wwjw_links</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>The Link Market's WWJW
|
10 |
-
<description>
|
11 |

|
12 |
-
|
|
|
|
|
13 |

|
14 |
-
|
|
|
15 |

|
16 |
-
|
17 |
-
<notes>1. Let your Web site also shows more than 100,000 on multiple sites,Improve your website SEO ranking,Bring to your site per day over more than 1000 unique visitors
|
18 |

|
19 |
-
|
20 |

|
21 |
-
|
22 |

|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<compatible/>
|
29 |
-
<dependencies><required><php><min>5.2.
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>wwjw_links</name>
|
4 |
+
<version>2.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>The Link Market's WWJW (Link Directory Management Service) plugin will manage all the links that have been traded through WWJW website.</summary>
|
10 |
+
<description>The Link Market's WWJW (Link Directory Management Service) plugin will manage all the links that have been traded through WWJW website.
|
11 |

|
12 |
+
Features:
|
13 |
+
1.You can login at api.wwjw.com to set the application of exchange links and exclude links that you don't want through PageRank.
|
14 |
+
Besides,you can delete them one by one.
|
15 |

|
16 |
+
2. Website of your company will be shown in more than 100000 websites, which promotes the SEO and page ranking.
|
17 |
+
It can also bring plenty of visitors for you.
|
18 |

|
19 |
+
3.Broken Links will be automaticly removed from your directory
|
|
|
20 |

|
21 |
+
4.The links will be added in the correct category as they are on WWJW site
|
22 |

|
23 |
+
5.You will not have more then 12 links per page
|
24 |

|
25 |
+
6.No more FTP will be uploaded to your server.
|
26 |
+

|
27 |
+
7.Once you agree to trade links,the link will be placed on your site
|
28 |
+

|
29 |
+
8.If link exchange does not happen or your link has been removed,we will remove the link from your directory
|
30 |
+

|
31 |
+
9.If someone wants to trade links with you but he is not a WWJW user,we will give him an option to sign up.He will get automatic link exchange with us if his settings for link exchange are the same with ours.
|
32 |
+

|
33 |
+
10.Customize your directory using Cascading Style Sheets (css)</description>
|
34 |
+
<notes>fixed some bugs</notes>
|
35 |
+
<authors><author><name>wwjw</name><user>wwjw</user><email>admin@wwjw.com</email></author></authors>
|
36 |
+
<date>2013-03-03</date>
|
37 |
+
<time>15:01:15</time>
|
38 |
+
<contents><target name="magelocal"><dir name="Wwjw"><dir name="Links"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="d0f5a4c7e981c4dded925440f7840b6e"/></dir></dir></dir></dir><file name="Links.php" hash="6d54064c18b2f22f2e8c7243e65562d2"/></dir><dir name="Helper"><file name="Data.php" hash="18f2abce0adeae151bea45173c16891e"/></dir><dir name="controllers"><file name="IndexController.php" hash="a474de7e88d4b9b8129fbc940e083ec9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cba06a768950dbb864904027a99be3e7"/><file name="config.xml" hash="f9a5c90fc0b6d76a6ee74539ee99c793"/><file name="system.xml" hash="46cf64828522e35590298f98149cbdc4"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wwjw_Links.xml" hash="16294301134768bf39cf39d6210be6d2"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="links.xml" hash="12fd07806392355bd470d73cb054c263"/></dir><dir name="template"><dir name="links"><file name="links.phtml" hash="1aed4b5872d6c0daed89e97036faf357"/><file name="post.phtml" hash="127297087346ee1662fce8fd0a14cbcd"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="links"><file name="hint.phtml" hash="d9e0167f678a47c3627425acd1a2e716"/></dir></dir></dir></dir></dir></target></contents>
|
39 |
<compatible/>
|
40 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
41 |
</package>
|