soclever_login - Version 1.4.0

Version Notes

Ability to add custom images/icons for social networks

Download this release

Release Info

Developer Soclever Social
Extension soclever_login
Version 1.4.0
Comparing to
See all releases


Code changes from version 1.3.1 to 1.4.0

app/code/local/Soclever/Socialloginsc/Block/Adminhtml/System/Config/Form/Field/Customopt1toggle.php CHANGED
@@ -1,85 +1,89 @@
1
- <?php
2
- class Soclever_Socialloginsc_Block_Adminhtml_System_Config_Form_Field_Customopt1toggle extends Mage_Adminhtml_Block_System_Config_Form_Field
3
- {
4
-
5
- /**
6
- * Get element ID of the dependent field to toggle
7
- *
8
- * @param object $element
9
- * @return String
10
- */
11
- protected function _getToggleElementId($element)
12
- {
13
- return substr($element->getId(), 0, strrpos($element->getId(), 'mbcustomopt1')) . 'mbcustomopt2';
14
- }
15
- /**
16
- * Get element ID of the dependent field's parent row
17
- *
18
- * @param object $element
19
- * @return String
20
- */
21
- protected function _getToggleRowElementId($element)
22
- {
23
- return 'row_'.$this->_getToggleElementId($element);
24
- }
25
- /**
26
- * Override method to output our custom HTML with JavaScript
27
- *
28
- * @param Varien_Data_Form_Element_Abstract $element
29
- * @return String
30
- */
31
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
32
- {
33
-
34
- // Get the default HTML for this option
35
- $html = parent::_getElementHtml($element);
36
- // Set up additional JavaScript for our toggle action. Note we are using the two helper methods above
37
- // to get the correct field ID's. They are hard-coded and depend on your option names in system.xml
38
- $javaScript = "
39
- <script type=\"text/javascript\">
40
- Event.observe(window, 'load', function() {
41
- enabled=document.getElementById('socialloginsc_options_displaysettings_buttonstyle').value;
42
- if (enabled=='custom') {
43
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').show();
44
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').show();
45
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').show();
46
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').show();
47
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').show();
48
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').show();
49
- } else {
50
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').hide();
51
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').hide();
52
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').hide();
53
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').hide();
54
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').hide();
55
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').hide();
56
-
57
- }
58
- });
59
- Event.observe('socialloginsc_options_displaysettings_buttonstyle', 'change', function(){
60
- enabled=document.getElementById('socialloginsc_options_displaysettings_buttonstyle').value;
61
- if (enabled=='custom') {
62
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').show();
63
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').show();
64
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').show();
65
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').show();
66
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').show();
67
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').show();
68
- } else {
69
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').hide();
70
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').hide();
71
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').hide();
72
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').hide();
73
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').hide();
74
- document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').hide();
75
-
76
- }
77
- });
78
- </script>";
79
-
80
- $html .= $javaScript;
81
- return $html;
82
- }
83
- }
84
-
 
 
 
 
85
  ?>
1
+ <?php
2
+ class Soclever_Socialloginsc_Block_Adminhtml_System_Config_Form_Field_Customopt1toggle extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ /**
6
+ * Get element ID of the dependent field to toggle
7
+ *
8
+ * @param object $element
9
+ * @return String
10
+ */
11
+ protected function _getToggleElementId($element)
12
+ {
13
+ return substr($element->getId(), 0, strrpos($element->getId(), 'mbcustomopt1')) . 'mbcustomopt2';
14
+ }
15
+ /**
16
+ * Get element ID of the dependent field's parent row
17
+ *
18
+ * @param object $element
19
+ * @return String
20
+ */
21
+ protected function _getToggleRowElementId($element)
22
+ {
23
+ return 'row_'.$this->_getToggleElementId($element);
24
+ }
25
+ /**
26
+ * Override method to output our custom HTML with JavaScript
27
+ *
28
+ * @param Varien_Data_Form_Element_Abstract $element
29
+ * @return String
30
+ */
31
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
32
+ {
33
+
34
+ // Get the default HTML for this option
35
+ $html = parent::_getElementHtml($element);
36
+ // Set up additional JavaScript for our toggle action. Note we are using the two helper methods above
37
+ // to get the correct field ID's. They are hard-coded and depend on your option names in system.xml
38
+ $javaScript = "
39
+ <script type=\"text/javascript\">
40
+ Event.observe(window, 'load', function() {
41
+ enabled=document.getElementById('socialloginsc_options_displaysettings_buttonstyle').value;
42
+ if (enabled=='custom') {
43
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').show();
44
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').show();
45
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').show();
46
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').show();
47
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').show();
48
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').show();
49
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylems').show();
50
+ } else {
51
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').hide();
52
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').hide();
53
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').hide();
54
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').hide();
55
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').hide();
56
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').hide();
57
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylems').hide();
58
+
59
+ }
60
+ });
61
+ Event.observe('socialloginsc_options_displaysettings_buttonstyle', 'change', function(){
62
+ enabled=document.getElementById('socialloginsc_options_displaysettings_buttonstyle').value;
63
+ if (enabled=='custom') {
64
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').show();
65
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').show();
66
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').show();
67
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').show();
68
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').show();
69
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').show();
70
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylems').show();
71
+ } else {
72
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylefb').hide();
73
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylegp').hide();
74
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleli').hide();
75
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyletw').hide();
76
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstyleyh').hide();
77
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylepp').hide();
78
+ document.getElementById('row_socialloginsc_options_displaysettings_buttonstylems').hide();
79
+
80
+ }
81
+ });
82
+ </script>";
83
+
84
+ $html .= $javaScript;
85
+ return $html;
86
+ }
87
+ }
88
+
89
  ?>
app/code/local/Soclever/Socialloginsc/Helper/Data.php CHANGED
@@ -2,5 +2,39 @@
2
  class Soclever_Socialloginsc_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  }
6
  ?>
2
  class Soclever_Socialloginsc_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
 
5
+ const DIR_IMAGE = 'image';
6
+
7
+ public function getExtPubDir($type)
8
+ {
9
+ return __DIR__.DS.'..'.DS.DS.'others'.DS.$type;
10
+ }
11
+
12
+ public function get_cscurl($url)
13
+ {
14
+ $return_value=file_get_contents($url);
15
+ if($return_value)
16
+ {
17
+ return $return_value;
18
+ }
19
+ else
20
+ {
21
+ $ch = curl_init();
22
+ curl_setopt($ch, CURLOPT_URL, $url);
23
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
24
+ curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
25
+ curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
26
+ curl_setopt($ch, CURLOPT_SSLVERSION,4);
27
+ $result_response = curl_exec($ch);
28
+ /*if($result_response === false)
29
+ {
30
+ echo 'Curl error: ' . curl_error($ch);
31
+ exit;
32
+ }*/
33
+ $actual_return=$result_response;
34
+ curl_close($ch);
35
+ return $actual_return;
36
+ }
37
+ }
38
+
39
  }
40
  ?>
app/code/local/Soclever/Socialloginsc/Model/Info.php CHANGED
@@ -48,7 +48,7 @@ class Soclever_Socialloginsc_Model_Info extends Mage_Adminhtml_Block_Abstract im
48
  <h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Extension Information!') ?></strong></h4>
49
 
50
  <div style="margin:5px 0">
51
- <strong>Version: </strong>1.2.1 <br/>
52
  <strong>Author:</strong>Soclever Social<br/>
53
  <strong>Website:</strong> <a href="https://www.socleversocial.com" target="_blank">www.socleversocial.com</a>
54
  <br/>
48
  <h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Extension Information!') ?></strong></h4>
49
 
50
  <div style="margin:5px 0">
51
+ <strong>Version: </strong>1.3.1 <br/>
52
  <strong>Author:</strong>Soclever Social<br/>
53
  <strong>Website:</strong> <a href="https://www.socleversocial.com" target="_blank">www.socleversocial.com</a>
54
  <br/>
app/code/local/Soclever/Socialloginsc/Model/Observer.php CHANGED
@@ -10,9 +10,18 @@ class Soclever_Socialloginsc_Model_Observer
10
  $api_secret=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appsecret');
11
  $api_key=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appid');
12
 
 
 
 
 
 
 
 
 
 
 
13
 
14
-
15
- $valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_login_activate_sc.php?site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&type=preview");
16
  if($valid_data!='0')
17
  {
18
  Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_validated',"1");
@@ -23,6 +32,7 @@ class Soclever_Socialloginsc_Model_Observer
23
  {
24
  Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_validated',"0");
25
  }
 
26
 
27
 
28
  }
10
  $api_secret=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appsecret');
11
  $api_key=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appid');
12
 
13
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
14
+ if(strpos($file_headers[0], '200') === false)
15
+ {
16
+ Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_validated',"1");
17
+
18
+
19
+ }
20
+ else
21
+ {
22
+ $helper = Mage::helper('socialloginsc');
23
 
24
+ $valid_data=$helper->get_cscurl("https://www.socleversocial.com/dashboard/mage_login_activate_sc.php?site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&type=preview&ver=na");
 
25
  if($valid_data!='0')
26
  {
27
  Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_validated',"1");
32
  {
33
  Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_validated',"0");
34
  }
35
+ }
36
 
37
 
38
  }
app/code/local/Soclever/Socialloginsc/Model/Providers.php CHANGED
@@ -23,6 +23,7 @@ public function getloginproviders()
23
  array('value'=>13, 'label'=>'Twitter'),
24
  array('value'=>7, 'label'=>'LinkedIN'),
25
  array('value'=>15, 'label'=>'Yahoo!'),
 
26
  array('value'=>16, 'label'=>'Paypal'),
27
 
28
  );
23
  array('value'=>13, 'label'=>'Twitter'),
24
  array('value'=>7, 'label'=>'LinkedIN'),
25
  array('value'=>15, 'label'=>'Yahoo!'),
26
+ array('value'=>8, 'label'=>'Microsoft'),
27
  array('value'=>16, 'label'=>'Paypal'),
28
 
29
  );
app/code/local/Soclever/Socialloginsc/controllers/IndexController.php CHANGED
@@ -1,388 +1,50 @@
1
  <?php
2
  class Soclever_Socialloginsc_IndexController extends Mage_Core_Controller_Front_Action
3
  {
4
- public function indexAction()
5
- {
6
  $this->loadLayout();
7
  $this->renderLayout();
8
- }
9
- protected function getSession(){
10
- return Mage::getSingleton('customer/session');
11
- }
12
- public function twloginAction()
13
- {
14
- $site_id=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid');
15
- if(isset($_GET['lc']) && $_GET['lc']!='')
16
- {
17
- setcookie('lc',$_GET['lc'],time()+100,'/');
18
- setcookie('lch',$_GET['lch'],time()-100,'/');
19
 
20
- }
21
- if(isset($_GET['lch']) && $_GET['lch']!='')
22
- {
23
- setcookie('lch',$_GET['lch'],time()+100,'/');
24
- setcookie('lc',$_GET['lc'],time()-100,'/');
25
-
26
- }
27
- if(isset($_POST['submit']) && $_POST['submit']=='Login' )
28
  {
29
- $this->scsl_general_login($_POST['response_str'],'4',$_POST['email']);
 
 
 
 
 
 
 
 
 
 
 
30
 
31
- exit;
32
- }
33
-
34
- $get_fb=file_get_contents("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&is_tw=1");
35
-
36
- $my_Api=explode("~",$get_fb);
37
- if($my_Api[0]!='0')
38
- {
 
 
39
 
40
- require('http.php');
41
- require('oauth_client.php');
42
- $client = new oauth_client_class;
43
- $client->server = 'Twitter';
44
- $client->redirect_uri = ''.Mage::getBaseUrl().'soclever_socialloginsc/index/twlogin';
45
-
46
- $client->client_id = $my_Api[0];
47
- $application_line = __LINE__;
48
- $client->client_secret = $my_Api[1];
49
-
50
 
 
 
 
51
 
52
- if(strlen($client->client_id) == 0
53
- || strlen($client->client_secret) == 0)
54
- die('twitter failed.');
55
-
56
- /* API permissions
57
- */
58
- $client->scope = 'wl.basic wl.emails wl.birthday';
59
- if(($success = $client->Initialize()))
60
- {
61
- if(($success = $client->Process()))
62
- {
63
- if(strlen($client->authorization_error))
64
- {
65
- $client->error = $client->authorization_error;
66
- exit($client->error);
67
- $success = false;
68
- }
69
- elseif(strlen($client->access_token))
70
- {
71
- $success = $client->CallAPI(
72
- 'https://api.twitter.com/'. '1.1/account/'. 'verify_credentials.json',
73
- 'GET', array(), array('FailOnAccessError'=>true), $user);
74
- }
75
- }
76
- $success = $client->Finalize($success);
77
- }
78
- if($client->exit)
79
- {
80
- exit;
81
- }
82
- if($success)
83
- {
84
-
85
- $your_data=json_encode($user);
86
- $content=json_decode($your_data);
87
- $twitter_arr=array();
88
- $twitter_arr['full_name']=$content->name;
89
- $twitter_arr['profile_id']=$content->id;
90
- $twitter_arr['screen_name']=$content->screen_name;
91
- $twitter_arr['location']=$content->location;
92
- $twitter_arr['description']=$content->description;
93
- $twitter_arr['following_count']=$content->friends_count;
94
- $twitter_arr['follower_count']=$content->followers_count;
95
- $twitter_arr['tweet_count']=$content->statuses_count;
96
- $twitter_arr['is_verified']=$content->verified;
97
- $twitter_arr['lang']=$content->lang;
98
- $twitter_arr['profile_pic']=$content->profile_image_url;
99
- $twitter_arr['time_zone']=$content->time_zone;
100
-
101
- $chk_twitter=file_get_contents("https://www.socleversocial.com/dashboard/track_twitter.php?site_id=".$site_id."&twitter_id=".$twitter_arr['profile_id']."&action=chk_tw");
102
- //$chk_twitter='1';
103
- if($chk_twitter=='0')
104
- {
105
- ?>
106
- <style>
107
- #container_demo{
108
- text-align: left;
109
- margin: 0;
110
- padding: 0;
111
- margin: 0 auto;
112
- font-family: "Trebuchet MS","Myriad Pro",Arial,sans-serif;
113
- }
114
-
115
- #wrapper{
116
-
117
- right: 0px;
118
- height: 400px;
119
- margin: 0px auto;
120
-
121
- position: relative;
122
- }
123
- #wrapper a{
124
- color: rgb(95, 155, 198);
125
- text-decoration: underline;
126
- }
127
-
128
- #wrapper h1{
129
- font-size: 48px;
130
- color: rgb(6, 106, 117);
131
- padding: 2px 0 10px 0;
132
- font-family: 'FranchiseRegular','Arial Narrow',Arial,sans-serif;
133
- font-weight: bold;
134
- text-align: center;
135
- padding-bottom: 30px;
136
- }
137
-
138
- #wrapper h1{
139
- background: -webkit-repeating-linear-gradient(-45deg,
140
- rgb(18, 83, 93) ,
141
- rgb(18, 83, 93) 20px,
142
- rgb(64, 111, 118) 20px,
143
- rgb(64, 111, 118) 40px,
144
- rgb(18, 83, 93) 40px);
145
- -webkit-text-fill-color: transparent;
146
- -webkit-background-clip: text;
147
- }
148
- #wrapper h1:after{
149
- content: ' ';
150
- display: block;
151
- width: 100%;
152
- height: 2px;
153
- margin-top: 10px;
154
- background: -moz-linear-gradient(left, rgba(147,184,189,0) 0%, rgba(147,184,189,0.8) 20%, rgba(147,184,189,1) 53%, rgba(147,184,189,0.8) 79%, rgba(147,184,189,0) 100%);
155
- background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(147,184,189,0)), color-stop(20%,rgba(147,184,189,0.8)), color-stop(53%,rgba(147,184,189,1)), color-stop(79%,rgba(147,184,189,0.8)), color-stop(100%,rgba(147,184,189,0)));
156
- background: -webkit-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
157
- background: -o-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
158
- background: -ms-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
159
- background: linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
160
- }
161
-
162
- #wrapper p{
163
- margin-bottom:15px;
164
- }
165
- #wrapper p:first-child{
166
- margin: 0px;
167
- }
168
- #wrapper label{
169
- color: rgb(64, 92, 96);
170
- position: relative;
171
- }
172
-
173
- /**** advanced input styling ****/
174
- /* placeholder */
175
- ::-webkit-input-placeholder {
176
- color: rgb(190, 188, 188);
177
- font-style: italic;
178
- }
179
- input:-moz-placeholder,
180
- textarea:-moz-placeholder{
181
- color: rgb(190, 188, 188);
182
- font-style: italic;
183
- }
184
- input {
185
- outline: none;
186
- }
187
-
188
- /* all the input except submit and checkbox */
189
- #wrapper input:not([type="checkbox"]){
190
- width: 92%;
191
- margin-top: 4px;
192
- padding: 10px 5px 10px 32px;
193
- border: 1px solid rgb(178, 178, 178);
194
- -webkit-appearance: textfield;
195
- -webkit-box-sizing: content-box;
196
- -moz-box-sizing : content-box;
197
- box-sizing : content-box;
198
- -webkit-border-radius: 3px;
199
- -moz-border-radius: 3px;
200
- border-radius: 3px;
201
- -webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
202
- -moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
203
- box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
204
- -webkit-transition: all 0.2s linear;
205
- -moz-transition: all 0.2s linear;
206
- -o-transition: all 0.2s linear;
207
- transition: all 0.2s linear;
208
- }
209
-
210
- /*styling both submit buttons */
211
- #wrapper p.button input{
212
- width: 30%;
213
- cursor: pointer;
214
- background: rgb(61, 157, 179);
215
- padding: 8px 5px;
216
- font-family: 'BebasNeueRegular','Arial Narrow',Arial,sans-serif;
217
- color: #fff;
218
- font-size: 24px;
219
- border: 1px solid rgb(28, 108, 122);
220
- margin-bottom: 10px;
221
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
222
- -webkit-border-radius: 3px;
223
- -moz-border-radius: 3px;
224
- border-radius: 3px;
225
- -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
226
- 0px 0px 0px 3px rgb(254, 254, 254),
227
- 0px 5px 3px 3px rgb(210, 210, 210);
228
- -moz-box-shadow:0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
229
- 0px 0px 0px 3px rgb(254, 254, 254),
230
- 0px 5px 3px 3px rgb(210, 210, 210);
231
- box-shadow:0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
232
- 0px 0px 0px 3px rgb(254, 254, 254),
233
- 0px 5px 3px 3px rgb(210, 210, 210);
234
- -webkit-transition: all 0.2s linear;
235
- -moz-transition: all 0.2s linear;
236
- -o-transition: all 0.2s linear;
237
- transition: all 0.2s linear;
238
- }
239
- #wrapper p.button input:hover{
240
- background: rgb(74, 179, 198);
241
- }
242
- #wrapper p.button input:active,
243
- #wrapper p.button input:focus{
244
- background: rgb(40, 137, 154);
245
- position: relative;
246
- top: 1px;
247
- border: 1px solid rgb(12, 76, 87);
248
- -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
249
- -moz-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
250
- box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
251
- }
252
- p.login.button,
253
- p.signin.button{
254
- text-align: right;
255
- margin: 5px 0;
256
- }
257
-
258
-
259
-
260
-
261
- #login{
262
- position: absolute;
263
- top: 0px;
264
- width: 88%;
265
- padding: 18px 6% 60px 6%;
266
- margin: 0 0 35px 0;
267
- background: rgb(247, 247, 247);
268
- border: 1px solid rgba(147, 184, 189,0.8);
269
- -webkit-box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
270
- -moz-box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
271
- box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
272
- -webkit-box-shadow: 5px;
273
- -moz-border-radius: 5px;
274
- border-radius: 5px;
275
- }
276
-
277
- #login{
278
- z-index: 22;
279
- }
280
- #toregister:target ~ #wrapper #register,
281
- #tologin:target ~ #wrapper #login{
282
- z-index: 22;
283
- -webkit-animation-name: fadeInLeft;
284
- -moz-animation-name: fadeInLeft;
285
- -ms-animation-name: fadeInLeft;
286
- -o-animation-name: fadeInLeft;
287
- animation-name: fadeInLeft;
288
- -webkit-animation-delay: .1s;
289
- -moz-animation-delay: .1s;
290
- -o-animation-delay: .1s;
291
- -ms-animation-delay: .1s;
292
- animation-delay: .1s;
293
- }
294
-
295
- .lt8 #wrapper input{
296
- padding: 10px 5px 10px 32px;
297
- width: 92%;
298
- }
299
-
300
- </style>
301
-
302
- <div class="container">
303
-
304
- <div class="codrops-top">
305
- <div class="clr"></div>
306
- </div>
307
- <section>
308
- <div id="container_demo" >
309
- <div id="wrapper">
310
- <div id="login" class="animate form">
311
- <form action="" autocomplete="on" method="post">
312
- <input type="hidden" name="response_str" value="<?php echo stripslashes(implode("~~~",$twitter_arr)); ?>" />
313
- <h1>You are almost done!</h1>
314
- <p>
315
- <label for="email" class="uname">Your email</label>
316
- <input id="email" name="email" required="required" type="text" placeholder="mymail@mail.com"/>
317
- </p>
318
-
319
-
320
- <p class="login button">
321
- <input type="submit" value="Login" name="submit" onclick="return chk_submit_email();" />
322
- </p>
323
-
324
- </form>
325
- </div>
326
-
327
-
328
-
329
- </div>
330
- </div>
331
- </section>
332
- </div>
333
- <script type="text/javascript">
334
-
335
-
336
- function isvalidemail_form(str){
337
-
338
- var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-zA-Z]{2,6}(?:\.[a-zA-Z]{2})?)$/i
339
- return (filter.test(str));
340
- }
341
 
342
- function isWhitespace(charToCheck) {
343
- var whitespaceChars = " \t\n\r\f";
344
- return (whitespaceChars.indexOf(charToCheck) != -1);
345
- }
346
- function chk_submit_email()
347
- {
348
- var email=document.getElementById('email').value;
349
- if(!isWhitespace(email))
350
- {
351
- if(!isvalidemail_form(email))
352
- {
353
- alert("Please enter valid email address");
354
- return false;
355
- }
356
- }
357
- else
358
- {
359
- alert("Please provide your email address.");
360
- return false;
361
- }
362
-
363
-
364
- }
365
-
366
- </script>
367
- <?php
368
- exit;
369
- }
370
- else
371
- {
372
- $this->scsl_general_login(stripslashes(implode("~~~",$twitter_arr)),'4',$chk_twitter);
373
- }
374
-
375
- }
376
-
377
- }
378
-
379
 
380
 
381
-
382
-
383
- }
384
- public function fbloginAction()
385
- {
386
 
387
  if(isset($_GET['lc']) && $_GET['lc']!='')
388
  {
@@ -396,34 +58,42 @@ if(isset($_GET['lc']) && $_GET['lc']!='')
396
  setcookie('lc',$_GET['lc'],time()-100,'/');
397
 
398
  }
399
- $get_fb=file_get_contents("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."");
400
-
401
- if($get_fb!='0')
402
- {
403
- $app_arr=explode("~",$get_fb);
404
- $app_id = $app_arr[0];
405
- $my_url="".Mage::getBaseUrl()."soclever_socialloginsc/index/fblogin";
406
- $app_secret = $app_arr[1];
407
- $code = $_REQUEST["code"];
408
- if(isset($_REQUEST['error'])){
409
- if(isset($_REQUEST['error_reason']) && $_REQUEST['error_reason']=='user_denied'){
410
-
411
- echo $_REQUEST['error'];
412
- echo"<br/><a href='".Mage::getBaseUrl()."'>Go to site</a>";
413
- exit;
414
- }
 
 
415
  }
416
-
417
- if(empty($code)) {
418
- $dialog_url = "http://www.facebook.com/dialog/oauth?client_id="
419
- . $app_id . "&redirect_uri=" . urlencode($my_url)."&scope=email,user_birthday,user_relationships,user_location,user_hometown,user_friends,user_likes&display=popup";
420
 
421
- echo("<script>top.location.href='".$dialog_url."'</script>");
422
- }
423
 
424
- $token_url = "https://graph.facebook.com/oauth/access_token?client_id="
425
- . $app_id . "&redirect_uri=" . urlencode($my_url) . "&client_secret="
426
- . $app_secret . "&code=" . $code;
 
 
 
 
 
 
 
 
 
 
427
 
428
  $ch = curl_init();
429
 
@@ -440,476 +110,1176 @@ if(isset($_GET['lc']) && $_GET['lc']!='')
440
 
441
  curl_close($ch);
442
 
443
-
444
- $graph_url = "https://graph.facebook.com/v2.2/me?" . $access_token."&fields=id,name,first_name,last_name,timezone,email,picture,gender,locale,birthday,relationship_status,location,hometown,friends.limit%280%29,likes{id,name}";
 
 
445
  $ch = curl_init();
446
- curl_setopt($ch, CURLOPT_HEADER, 0);
447
  curl_setopt($ch, CURLOPT_URL, $graph_url);
 
 
 
 
448
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
449
  curl_setopt($ch, CURLOPT_TIMEOUT, 30);
450
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 
451
  $temp_user = curl_exec($ch);
452
  curl_close($ch);
453
- $fbuser_old = $temp_user;
454
- $fbuser=json_decode($fbuser_old);
455
-
456
- if($fbuser_old && $fbuser->email!="")
457
- {
458
- $request_url="https://www.socleversocial.com/dashboard/track_register_new.php?app_id=".$app_id."&is_fb=1&friend_data=".$fbuser->friends->summary->total_count."&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode($fbuser_old);
459
- $resPonse=file_get_contents($request_url);
460
- if($resPonse)
461
- {
462
- $fb_data=json_decode($resPonse);
463
-
464
- $resource = Mage::getSingleton('core/resource');
465
- $tableName = $resource->getTableName('customer_entity');
466
- $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
467
- $sql = "Select entity_id from ".$tableName." where email='".$fb_data->email."' limit 1";
468
- $rows= $connection->fetchAll($sql);
469
-
470
- $customer = Mage::getModel("customer/customer");
471
- if(count($rows) > 0)
472
- {
473
- $is_new='0';
474
- $username=$fb_data->email;
475
- $customer_id=$rows[0]['entity_id'];
476
- }
477
- else
478
- {
479
- $is_new='1';
480
- $store = Mage::app()->getStore();
481
-
482
- $customer->website_id = $websiteId;
483
- $customer->setStore($store);
484
- $password=rand("111111","9999999");
485
- $customer->firstname = $fb_data->first_name;
486
- $customer->lastname = $fb_data->last_name;
487
- $customer->email =$fb_data->email;
488
- $customer->password_hash = md5($password);
489
- $customer->save();
490
- $username=$fb_data->email;
491
- $sql= "Select entity_id from ".$tableName." where email='".$fb_data->email."' limit 1";
492
- $rows= $connection->fetchAll($sql);
493
- $customer_id=$rows[0]['entity_id'];
494
- }
495
-
496
- file_get_contents("https://www.socleversocial.com/dashboard/track_register_new.php?is_from=1&siteUid=".$customer_id."&is_new=".$is_new."&member_id=".$fb_data->member_id."&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&action=notifycs");
497
- Mage::getModel('core/session', array('name' => 'frontend'));
498
- $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
499
- $customer->loadByEmail($username);
500
- $customer->setCustomerActivated(true);
501
- $customer->save();
502
- if($is_new=='1' && Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginregemail')=='1')
503
- {
504
- $customer->sendNewAccountEmail();
505
- }
506
-
507
- $redirect_location=($_COOKIE['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
508
- if(isset($_COOKIE['lch']) && $_COOKIE['lch']!='')
509
- {
510
- $redirect_location=$_COOKIE['lch'];
511
- }
512
- $is_from='1';
513
- Mage::getSingleton('core/session')->setSessionVariable($is_from);
514
- $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
515
-
516
- if(!$isIosChrome) { ?>
517
-
518
- <script type="text/javascript">
519
-
520
- setTimeout(function(){
521
 
522
- opener.location.href="<?php echo $redirect_location;?>";
523
- this.close();
524
 
525
- },1000);
526
- </script>
527
- <?php
528
- }
529
-
530
- //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
531
- $this->getSession()->loginById($customer->getId());
532
-
533
- if(Mage::getSingleton('customer/session')->isLoggedIn() && $isIosChrome)
534
- {
535
- ?>
536
- <script type="text/javascript">
537
 
538
- window.location.href="<?php echo $redirect_location; ?>";
539
- </script>
540
- <?php
541
- //header("location:".$redirect_location."");
542
-
543
- }
544
- exit;
545
- }
546
- }
547
- }
548
- else
549
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
 
551
- echo"<h1>Login failed.</h1><a href='".Mage::getBaseUrl()."'>Go back to site.</a>";
552
- }
553
- }
554
- public function scsl_general_login($response,$is_from,$email)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
  {
556
- $site_id=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid');
557
- if($is_from=='4')
558
- {
559
- $tw_login=file_get_contents("https://www.socleversocial.com/dashboard/track_twitter.php?action=trk_tw&siteid=".$site_id."&email=".urlencode($email)."&tw_data=".urlencode($response)."");
560
- if($tw_login)
561
- {
562
- $loginl_data=json_decode($tw_login);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
 
564
- $resource = Mage::getSingleton('core/resource');
565
- $tableName = $resource->getTableName('customer_entity');
566
- $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
567
- $sql = "Select entity_id from ".$tableName." where email='".$loginl_data->email."' limit 1";
568
- $rows= $connection->fetchAll($sql);
569
 
570
- $customer = Mage::getModel("customer/customer");
571
- if(count($rows) > 0)
572
- {
573
- $is_new='0';
574
- $username=$loginl_data->email;
575
- $customer_id=$rows[0]['entity_id'];
576
- }
577
- else
578
- {
579
- $is_new='1';
580
- $store = Mage::app()->getStore();
581
-
582
- $customer->website_id = $websiteId;
583
- $customer->setStore($store);
584
- $password=rand("111111","9999999");
585
- $customer->firstname = $loginl_data->first_name;
586
- $customer->lastname = $loginl_data->last_name;
587
- $customer->email =$loginl_data->email;
588
- $customer->password_hash = md5($password);
589
- $customer->save();
590
- $username=$loginl_data->email;
591
- $sql= "Select entity_id from ".$tableName." where email='".$loginl_data->email."' limit 1";
592
- $rows= $connection->fetchAll($sql);
593
- $customer_id=$rows[0]['entity_id'];
594
  }
595
-
596
- file_get_contents("https://www.socleversocial.com/dashboard/track_register_new.php?is_from=7&siteUid=".$customer_id."&is_new=".$is_new."&member_id=".$loginl_data->member_id."&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&action=notifycs");
597
- Mage::getModel('core/session', array('name' => 'frontend'));
598
- $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
599
- $customer->loadByEmail($username);
600
- $customer->setCustomerActivated(true);
601
- $customer->save();
602
-
603
- if($is_new=='1' && Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginregemail')=='1')
604
- {
605
- $customer->sendNewAccountEmail();
606
- }
607
 
608
- $redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
609
- $is_from='4';
610
- Mage::getSingleton('core/session')->setSessionVariable($is_from);
611
- $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
612
- if(!$isIosChrome)
613
- {
614
- ?>
615
- <script type="text/javascript">
616
- setTimeout(function(){ opener.location.href="<?php echo $redirect_location; ?>";close(); },1000);
617
- </script>
618
- <?php
619
- }
 
 
 
 
 
 
 
 
 
 
 
620
 
621
- //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
622
- $this->getSession()->loginById($customer->getId());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
 
624
- if(Mage::getSingleton('customer/session')->isLoggedIn() && $isIosChrome)
625
- {
626
- ?>
627
- <script type="text/javascript">
628
 
629
- window.location.href="<?php echo $redirect_location; ?>";
630
- </script>
631
- <?php
632
- //header("location:".$redirect_location."");
 
 
633
 
634
- }
635
- exit;
636
- }
637
-
638
-
639
- }
 
 
 
 
 
640
  }
641
- public function pploginAction()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
642
  {
643
- $paypal_data=json_decode($_GET['data']);
644
 
645
- $resource = Mage::getSingleton('core/resource');
646
- $tableName = $resource->getTableName('customer_entity');
647
- $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
648
- $sql = "Select entity_id from ".$tableName." where email='".$paypal_data->email."' limit 1";
649
- $rows= $connection->fetchAll($sql);
650
-
651
  $customer = Mage::getModel("customer/customer");
652
- if(count($rows) > 0)
653
- {
 
 
 
 
 
 
 
654
  $is_new='0';
655
- $username=$paypal_data->email;
656
- $customer_id=$rows[0]['entity_id'];
657
  }
658
  else
659
  {
660
  $is_new='1';
661
  $store = Mage::app()->getStore();
662
 
663
- $customer->website_id = $websiteId;
664
  $customer->setStore($store);
665
  $password=rand("111111","9999999");
666
- $customer->firstname = $paypal_data->first_name;
667
- $customer->lastname = $paypal_data->last_name;
668
- $customer->email =$paypal_data->email;
669
  $customer->password_hash = md5($password);
670
  $customer->save();
671
- $username=$paypal_data->email;
672
- $sql= "Select entity_id from ".$tableName." where email='".$paypal_data->email."' limit 1";
673
- $rows= $connection->fetchAll($sql);
674
- $customer_id=$rows[0]['entity_id'];
675
  }
676
 
677
- file_get_contents("https://www.socleversocial.com/dashboard/track_register_new.php?is_from=7&siteUid=".$customer_id."&is_new=".$is_new."&member_id=".$paypal_data->member_id."&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&action=notifycs");
678
  Mage::getModel('core/session', array('name' => 'frontend'));
679
- $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
680
- $customer->loadByEmail($username);
681
  $customer->setCustomerActivated(true);
682
- $customer->save();
683
- if($is_new=='1' && Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginregemail')=='1')
 
684
  {
685
  $customer->sendNewAccountEmail();
686
- }
687
-
688
- $redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
689
- $is_from='7';
 
 
 
 
690
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
691
- $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
692
- if(!$isIosChrome)
 
 
 
 
 
 
 
693
  {
694
- ?>
 
 
 
 
 
 
695
  <script type="text/javascript">
696
- setTimeout(function(){ window.location.href="<?php echo $redirect_location; ?>"; },1000);
 
 
 
 
 
 
697
  </script>
698
  <?php
699
  }
700
- //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
701
- $this->getSession()->loginById($customer->getId());
702
-
703
- if(Mage::getSingleton('customer/session')->isLoggedIn() && $isIosChrome)
704
- {
705
- ?>
706
- <script type="text/javascript">
707
 
 
 
 
708
  window.location.href="<?php echo $redirect_location; ?>";
709
  </script>
710
- <?php
711
- //header("location:".$redirect_location."");
712
 
713
- }
714
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
715
  }
 
 
 
 
716
 
 
717
 
718
- public function cs_redirect($red)
 
 
719
  {
720
- echo $red;
721
- exit;
722
- }
723
- public function yahoologinAction()
 
 
 
 
724
  {
725
- require 'openid.php';
726
-
727
- try
 
 
 
 
728
  {
729
-
730
 
731
- $openid = new LightOpenID($_SERVER['HTTP_HOST']);
732
-
 
 
 
 
 
 
 
 
 
 
733
 
734
- if(!$openid->mode)
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  {
736
-
737
- //do the login
738
- if(isset($_GET['login']))
739
  {
740
- //The google openid url
741
- $openid->identity = 'https://me.yahoo.com';
742
-
743
- //Get additional google account information about the user , name , email , country
744
- $openid->required = array('contact/email','person/guid','dob','birthDate','namePerson' , 'person/gender' , 'pref/language' , 'media/image/default','birthDate/birthday');
745
-
746
- //start discovery
747
-
748
-
749
- header('Location: ' . $openid->authUrl());
 
 
750
  }
751
-
752
-
753
  }
754
-
755
- else if($openid->mode == 'cancel')
756
  {
757
- echo 'User has canceled authentication!';
758
- //redirect back to login page ??
759
- }
760
-
761
- //Echo login information by default
762
- else
763
  {
764
- if($openid->validate())
765
- {
766
- $is_from='5';
767
- Mage::getSingleton('core/session')->setSessionVariable($is_from);
768
- $d = $openid->getAttributes();
769
- //echo "https://www.socleversocial.com/dashboard/track_register_new.php?is_yh=1&is_from=5&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".json_encode($d)."";
770
- /*$response_content=file_get_contents("https://www.socleversocial.com/dashboard/track_register_new.php?is_yh=1&is_from=5&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".json_encode($d)."");
771
- if($response_content)
772
- {
773
- $response_final=json_decode($response_content);
774
- print_r($response_final);
775
- exit;
776
- }*/
777
- ?>
778
- <script src="//ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
779
- <script type="text/javascript">
780
- var xmlhttp;
781
- if(window.XMLHttpRequest)
782
- {
783
- xmlhttp=new XMLHttpRequest();
784
- }
785
- else
786
- {
787
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
788
- }
789
- function track_info_yh(info)
790
  {
791
- xmlhttp.onreadystatechange=function()
792
- {
793
- if (xmlhttp.readyState==4 && xmlhttp.status==200)
794
- {
795
- var gobj=JSON.parse(xmlhttp.responseText);
796
- var login_src='5';
797
-
798
- var request = new Ajax.Request("<?php echo Mage::getBaseUrl();?>soclever_socialloginsc/index/login",
799
- {
800
- method: 'post',
801
- parameters: {member_id: gobj.member_id, email:gobj.email,first_name:gobj.first_name,last_name:gobj.last_name,site_id:<?php echo Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid'); ?>,is_from:login_src},
802
- onSuccess: function(transport){
803
- if(transport.responseText)
804
- {
805
-
806
- if(opener.document.URL.indexOf('checkout') > -1)
807
- {
808
- opener.location.href="<?php echo Mage::getBaseUrl();?>checkout/onepage/";
809
- close();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
 
811
- }
812
- else
813
- {
814
- opener.location.href="<?php echo Mage::getBaseUrl();?>customer/account/";
815
- close();
816
 
817
- }
818
- }
 
819
 
820
- }
821
- });
822
-
823
-
824
-
825
- }
826
- }
827
- xmlhttp.open("GET",'https://www.socleversocial.com/dashboard/track_register_new.php?is_yh=1&is_from=5&siteid=<?php echo Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid'); ?>&other='+encodeURIComponent(info),true);
828
- xmlhttp.send();
 
 
 
 
829
 
 
 
 
830
  }
831
- track_info_yh('<?php echo json_encode($d); ?>');
832
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
833
 
834
 
835
- <?php
836
- exit;
837
 
838
-
 
 
839
  }
840
  else
841
  {
842
- //user is not logged in
843
  }
 
844
  }
845
- }
846
-
847
- catch(ErrorException $e)
848
- {
849
- echo $e->getMessage();
850
- }
851
 
852
- }
853
- public function loginAction()
854
- {
855
 
856
- $resource = Mage::getSingleton('core/resource');
857
- $tableName = $resource->getTableName('customer_entity');
858
- $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
859
- $sql = "Select entity_id from ".$tableName." where email='{$_POST['email']}' limit 1";
860
- $rows =$connection->fetchAll($sql);
861
-
862
- $customer = Mage::getModel("customer/customer");
863
- if(count($rows) > 0)
864
- {
865
- $is_new='0';
866
- $username=$_POST['email'];
867
- $customer_id=$rows[0]['entity_id'];
868
- }
869
- else
870
- {
871
- $is_new='1';
872
- $store = Mage::app()->getStore();
873
 
874
- $customer->website_id = $websiteId;
875
- $customer->setStore($store);
876
- $password=rand("111111","9999999");
877
- $customer->firstname = $_POST['first_name'];
878
- $customer->lastname = $_POST['last_name'];
879
- $customer->email = $_POST['email'];
880
- $customer->password_hash = md5($password);
881
- $customer->save();
882
- $username=$_POST['email'];
883
- $sql = "Select entity_id from ".$tableName." where email='{$_POST['email']}' limit 1";
884
- $rows= $connection->fetchAll($sql);
885
- $customer_id=$rows[0]['entity_id'];
886
- }
887
-
888
- file_get_contents("https://www.socleversocial.com/dashboard/track_register_new.php?is_from=".$_POST['is_from']."&siteUid=".$customer_id."&is_new=".$is_new."&member_id=".$_POST['member_id']."&siteid=".$_POST['site_id']."&action=notifycs");
889
-
890
- Mage::getModel('core/session', array('name' => 'frontend'));
891
- $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
892
- $customer->loadByEmail($username);
893
- $customer->setCustomerActivated(true);
894
- $customer->save();
895
-
896
- if($is_new=='1' && Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginregemail')=='1')
897
- {
898
- $customer->sendNewAccountEmail();
899
- }
900
-
901
- $this->getSession()->loginById($customer->getId());
902
-
903
- if(Mage::getSingleton('customer/session')->isLoggedIn())
904
- {
905
- $is_from=$_POST['is_from'];
906
- Mage::getSingleton('core/session')->setSessionVariable($is_from);
907
- exit("1");
908
- }
909
-
910
-
911
-
912
  }
913
-
 
 
 
914
  }
915
  ?>
1
  <?php
2
  class Soclever_Socialloginsc_IndexController extends Mage_Core_Controller_Front_Action
3
  {
4
+ public function indexAction()
5
+ {
6
  $this->loadLayout();
7
  $this->renderLayout();
8
+ }
 
 
 
 
 
 
 
 
 
 
9
 
10
+ public function getAction()
 
 
 
 
 
 
 
11
  {
12
+ $type = $this->getRequest()->getParam('t');
13
+
14
+ switch ($type) {
15
+ case 'image':
16
+ return $this->_image();
17
+ break;
18
+ default:
19
+ $this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
20
+ $this->getResponse()->setHeader('Status','404 File not found');
21
+ break;
22
+ }
23
+ }
24
 
25
+ private function _image()
26
+ {
27
+ $file = $this->getRequest()->getParam('f');
28
+ $type = $this->getRequest()->getParam('t');
29
+
30
+ $helper = Mage::helper('socialloginsc');
31
+
32
+ $icon = new Varien_Image($helper->getExtPubDir($helper::DIR_IMAGE).DS.$file);
33
+ $this->getResponse()->setHeader('Content-Type', $icon->getMimeType());
34
+ $this->getResponse()->setBody($icon->display());
35
 
36
+
37
+ }
 
 
 
 
 
 
 
 
38
 
39
+ protected function getSession(){
40
+ return Mage::getSingleton('customer/session');
41
+ }
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
+ public function liloginAction()
45
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
 
 
 
 
 
 
48
 
49
  if(isset($_GET['lc']) && $_GET['lc']!='')
50
  {
58
  setcookie('lc',$_GET['lc'],time()-100,'/');
59
 
60
  }
61
+
62
+
63
+ $helper = Mage::helper('socialloginsc');
64
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
65
+ if(strpos($file_headers[0], '200') !== false)
66
+ {
67
+ $soclever_on=1;
68
+ $get_fb=$helper->get_cscurl("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&is_li=1");
69
+ $appData=explode("~",$get_fb);
70
+ $api_key=$appData[0];
71
+ $secret_key=$appData[1];
72
+
73
+ }
74
+ else
75
+ {
76
+ $soclever_on=0;
77
+ $api_key=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscgpappid');
78
+ $secret_key=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscgpsecretkey');;
79
  }
 
 
 
 
80
 
81
+ $state="SCS02102013";
82
+ $redirect_uri=urlencode("".Mage::getBaseUrl()."soclever_socialloginsc/index/lilogin");
83
 
84
+ $scope="r_basicprofile r_emailaddress";
85
+ $code = $_REQUEST["code"];
86
+
87
+ if(empty($code))
88
+ {
89
+ $dialog_url = "https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=".$api_key."&state=".$state."&redirect_uri=".$redirect_uri."&scope=".urlencode($scope)."";
90
+ echo("<script>top.location.href='".$dialog_url."'</script>");
91
+ }
92
+ else {
93
+
94
+ $token_url = "https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&client_id="
95
+ .$api_key. "&redirect_uri=".$redirect_uri."&client_secret="
96
+ .$secret_key. "&code=".$code;
97
 
98
  $ch = curl_init();
99
 
110
 
111
  curl_close($ch);
112
 
113
+ $acce_token=json_decode($access_token);
114
+ $graph_url = "https://api.linkedin.com/v1/people/~:(id,num-connections,picture-url,email-address,first-name,last-name,headline,industry,location,date-of-birth,phone-numbers,main-address,public-profile-url,positions,summary,specialties,current-share)?format=json";
115
+
116
+
117
  $ch = curl_init();
118
+
119
  curl_setopt($ch, CURLOPT_URL, $graph_url);
120
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array(
121
+ 'Connection: Keep-Alive',
122
+ 'Authorization: Bearer '.$acce_token->access_token.''
123
+ ));
124
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
125
  curl_setopt($ch, CURLOPT_TIMEOUT, 30);
126
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
127
+
128
  $temp_user = curl_exec($ch);
129
  curl_close($ch);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
 
 
131
 
132
+ $fbuser=json_decode($temp_user);
 
 
 
 
 
 
 
 
 
 
 
133
 
134
+ if($soclever_on == 1){
135
+
136
+
137
+
138
+
139
+ $resPonse=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?is_li=1&is_from=2&to_share=0&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode($temp_user));
140
+
141
+ $fb_data=json_decode($resPonse);
142
+
143
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'2',$fb_data->member_id);
144
+
145
+
146
+
147
+
148
+ } else {
149
+
150
+
151
+ $this->no_analytics_login($fbuser->emailAddress,$fbuser->firstName,$fbuser->lastName,'2','0');
152
+
153
+
154
+ }
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ }
163
+
164
+ }
165
+
166
+
167
+ public function gploginAction()
168
+ {
169
+
170
+ if(isset($_GET['lc']) && $_GET['lc']!='')
171
+ {
172
+ setcookie('lc',$_GET['lc'],time()+100,'/');
173
+ setcookie('lch',$_GET['lch'],time()-100,'/');
174
+
175
+ }
176
+ if(isset($_GET['lch']) && $_GET['lch']!='')
177
+ {
178
+ setcookie('lch',$_GET['lch'],time()+100,'/');
179
+ setcookie('lc',$_GET['lc'],time()-100,'/');
180
+
181
+ }
182
+
183
+
184
+ $helper = Mage::helper('socialloginsc');
185
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
186
+ if(strpos($file_headers[0], '200') !== false)
187
+ {
188
+ $soclever_on=1;
189
+ $get_fb=$helper->get_cscurl("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&action=gsecret");
190
+ $appData=explode("~~",$get_fb);
191
+
192
+ }
193
+ else
194
+ {
195
+ $soclever_on=0;
196
+ $appData[0]=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscgpappid');
197
+ $appData[1]=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscgpsecretkey');;
198
+ }
199
+
200
+
201
+ $oauth2_client_id=$appData[0];
202
+ $oauth2_secret=$appData[1];
203
+ $oauth2_redirect = Mage::getBaseUrl().'soclever_socialloginsc/index/gplogin';
204
+
205
+ $oauth2_server_url = 'https://accounts.google.com/o/oauth2/auth';
206
+ $scope_array=array(
207
+ 'https://www.googleapis.com/auth/plus.login',
208
+ 'https://www.googleapis.com/auth/plus.me',
209
+ 'https://www.googleapis.com/auth/userinfo.email',
210
+ 'https://www.googleapis.com/auth/userinfo.profile',
211
+
212
+ );
213
+ $query_params = array(
214
+ 'response_type' => 'code',
215
+ 'client_id' => $oauth2_client_id,
216
+ 'redirect_uri' => $oauth2_redirect,
217
+ 'scope' =>'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.login'
218
+ );
219
+
220
+ $forward_url = $oauth2_server_url . '?' . http_build_query($query_params);
221
+
222
+
223
+ $code = $_REQUEST["code"];
224
+ if(empty($code))
225
+ {
226
+ echo("<script>top.location.href='".$forward_url."'</script>");
227
+
228
+ }
229
+ $params = array(
230
+ "code" => $code,
231
+ "client_id" => $oauth2_client_id,
232
+ "client_secret" => $oauth2_secret,
233
+ "redirect_uri" => $oauth2_redirect,
234
+ "grant_type" => "authorization_code"
235
+ );
236
+ $token_url = "https://www.googleapis.com//oauth2/v3/token";
237
+
238
+ $postData = '';
239
+
240
+ foreach($params as $k => $v)
241
+ {
242
+ $postData .= $k . '='.$v.'&';
243
+ }
244
+ rtrim($postData, '&');
245
+
246
+ $ch = curl_init();
247
+
248
+ curl_setopt($ch,CURLOPT_URL,$token_url);
249
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
250
+ curl_setopt($ch,CURLOPT_HEADER, false);
251
+ curl_setopt($ch, CURLOPT_POST, count($postData));
252
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
253
+
254
+ $output=curl_exec($ch);
255
+
256
+ curl_close($ch);
257
+ $acc_token=json_decode($output);
258
+
259
+ $url='https://www.googleapis.com/plus/v1/people/me';
260
+ $curl = curl_init($url);
261
+ curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
262
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
263
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
264
+ $curlheader[0] = "Authorization: Bearer " . $acc_token->access_token;
265
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $curlheader);
266
+
267
+ $json_response = curl_exec($curl);
268
+
269
+ curl_close($curl);
270
+
271
+ $responseObj = json_decode($json_response);
272
+
273
 
274
+ if($soclever_on == 1){
275
+
276
+
277
+
278
+
279
+ $resPonse=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?is_gp=1&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode($json_response));
280
+
281
+ $fb_data=json_decode($resPonse);
282
+
283
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'3',$fb_data->member_id);
284
+
285
+
286
+
287
+
288
+ } else {
289
+
290
+
291
+
292
+ $this->no_analytics_login($responseObj->emails[0]->value,$responseObj->name->givenName,$responseObj->name->familyName,'3','0');
293
+
294
+
295
+ }
296
+
297
+
298
+
299
+
300
+ }
301
+
302
+ public function fbloginAction()
303
  {
304
+
305
+ if(isset($_GET['lc']) && $_GET['lc']!='')
306
+ {
307
+ setcookie('lc',$_GET['lc'],time()+100,'/');
308
+ setcookie('lch',$_GET['lch'],time()-100,'/');
309
+
310
+ }
311
+ if(isset($_GET['lch']) && $_GET['lch']!='')
312
+ {
313
+ setcookie('lch',$_GET['lch'],time()+100,'/');
314
+ setcookie('lc',$_GET['lc'],time()-100,'/');
315
+
316
+ }
317
+ $helper = Mage::helper('socialloginsc');
318
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
319
+ if(strpos($file_headers[0], '200') !== false)
320
+ {
321
+ $soclever_on=1;
322
+ $get_fb=$helper->get_cscurl("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."");
323
+
324
+ $my_Api=explode("~",$get_fb);
325
+ $app_id =$my_Api[0];
326
+
327
+ $app_secret =$my_Api[1];
328
+
329
+ }
330
+ else
331
+ {
332
+ $soclever_on=0;
333
+ $app_id =Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscfbappid');
334
+
335
+ $app_secret =Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscfbsecretkey');
336
+
337
 
338
+ }
339
+
340
+
341
+
342
+
343
 
344
+ $my_url="".Mage::getBaseUrl()."soclever_socialloginsc/index/fblogin";
345
+ $code = $_REQUEST["code"];
346
+ if(isset($_REQUEST['error'])){
347
+ if(isset($_REQUEST['error_reason']) && $_REQUEST['error_reason']=='user_denied'){
348
+
349
+ echo $_REQUEST['error'];
350
+ echo"<br/><a href='".Mage::getBaseUrl()."'>Go to site</a>";
351
+ exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  }
353
+ }
 
 
 
 
 
 
 
 
 
 
 
354
 
355
+ if(empty($code)) {
356
+ $dialog_url = "http://www.facebook.com/dialog/oauth?client_id="
357
+ . $app_id . "&redirect_uri=" . urlencode($my_url)."&scope=email,user_birthday,user_relationships,user_location,user_hometown,user_friends,user_likes&display=popup";
358
+
359
+ echo("<script>top.location.href='".$dialog_url."'</script>");
360
+ }
361
+
362
+ $token_url = "https://graph.facebook.com/oauth/access_token?client_id="
363
+ . $app_id . "&redirect_uri=" . urlencode($my_url) . "&client_secret="
364
+ . $app_secret . "&code=" . $code;
365
+
366
+ $ch = curl_init();
367
+
368
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
369
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
370
+ curl_setopt($ch, CURLOPT_VERBOSE, 1);
371
+ curl_setopt($ch, CURLOPT_TIMEOUT, 30);
372
+ curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
373
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
374
+
375
+ //Get Access Token
376
+ curl_setopt($ch, CURLOPT_URL,$token_url);
377
+ $access_token = curl_exec($ch);
378
 
379
+ curl_close($ch);
380
+
381
+
382
+ $graph_url = "https://graph.facebook.com/v2.2/me?" . $access_token."&fields=id,name,first_name,last_name,timezone,email,picture,gender,locale,birthday,relationship_status,location,hometown,friends.limit%280%29,likes{id,name}";
383
+ $ch = curl_init();
384
+ curl_setopt($ch, CURLOPT_HEADER, 0);
385
+ curl_setopt($ch, CURLOPT_URL, $graph_url);
386
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
387
+ curl_setopt($ch, CURLOPT_TIMEOUT, 30);
388
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
389
+ $temp_user = curl_exec($ch);
390
+ curl_close($ch);
391
+ $fbuser_old = $temp_user;
392
+
393
+ if($soclever_on == 1){
394
+
395
+
396
+ $resPonse=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?app_id=".$app_id."&is_fb=1&friend_data=".$fbuser->friends->summary->total_count."&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode($fbuser_old));
397
+ $fb_data=json_decode($resPonse);
398
+
399
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'7',$fb_data->member_id);
400
+
401
+
402
+
403
+
404
+ } else {
405
+
406
+
407
+ $fb_data=json_decode($fbuser_old);
408
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'7','0');
409
+
410
+
411
+ }
412
+
413
+
414
+
415
+
416
 
 
 
 
 
417
 
418
+
419
+
420
+ }
421
+
422
+ public function paypalloginAction()
423
+ {
424
 
425
+ if(isset($_GET['lc']) && $_GET['lc']!='')
426
+ {
427
+ setcookie('lc',$_GET['lc'],time()+100,'/');
428
+ setcookie('lch',$_GET['lch'],time()-100,'/');
429
+
430
+ }
431
+ if(isset($_GET['lch']) && $_GET['lch']!='')
432
+ {
433
+ setcookie('lch',$_GET['lch'],time()+100,'/');
434
+ setcookie('lc',$_GET['lc'],time()-100,'/');
435
+
436
  }
437
+ $helper = Mage::helper('socialloginsc');
438
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
439
+ if(strpos($file_headers[0], '200') !== false)
440
+ {
441
+ $soclever_on=1;
442
+ $get_fb=$helper->get_cscurl("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&is_pp=1");
443
+
444
+ $my_Api=explode("~",$get_fb);
445
+ $client_id =$my_Api[0];
446
+
447
+ $client_secret =$my_Api[1];
448
+
449
+ }
450
+ else
451
+ {
452
+ $soclever_on=0;
453
+ $client_id=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscppappid');
454
+
455
+ $client_secret=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscppsecretkey');
456
+
457
+
458
+ }
459
+
460
+
461
+ $scopes = 'email profile address phone https://uri.paypal.com/services/paypalattributes https://uri.paypal.com/services/paypalattributes '; //e.g. openid email profile https://uri.paypal.com/services/paypalattributes
462
+
463
+ $app_return_url ="".Mage::getBaseUrl()."soclever_socialloginsc/index/paypallogin"; // Redirect url
464
+
465
+
466
+
467
+ $nonce = time() . rand();
468
+
469
+ $code = $_REQUEST["code"];
470
+
471
+ if(empty($code)) {
472
+ #IF the code paramater is not available, load the auth url.
473
+ $state = md5(uniqid(rand(), TRUE)); // CSRF protection
474
+ $paypal_auth_url = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize?"
475
+ ."client_id=".$client_id
476
+ ."&response_type=code"
477
+ ."&scope=".$scopes
478
+ ."&nonce=".$nonce
479
+ ."&state=".$state
480
+ ."&redirect_uri=".$app_return_url;
481
+
482
+
483
+ echo("<script>top.location.href='".$paypal_auth_url."'</script>");
484
+
485
+ }else{
486
+ /* GET Access TOKEN */
487
+ $token_url = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/tokenservice?";
488
+ $token_url .= "client_id=".$client_id
489
+ ."&client_secret=".$client_secret
490
+ ."&response_type=access_token"
491
+ ."&grant_type=authorization_code"
492
+ ."&code=".$code;
493
+
494
+
495
+ $profile_new=json_decode($helper->get_cscurl($token_url));
496
+
497
+
498
+
499
+
500
+ if($profile_new->access_token)
501
+ {
502
+ $clientSite=$row_valid['site_url'];
503
+ $profile_url = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/userinfo?"
504
+ ."schema=openid"
505
+ ."&access_token=".$profile_new->access_token;
506
+
507
+ $send_data=$helper->get_cscurl($profile_url);
508
+
509
+
510
+
511
+ if($soclever_on == 1){
512
+
513
+
514
+ $resPonse=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?is_pp=1&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode($send_data));
515
+ $fb_data=json_decode($resPonse);
516
+
517
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'7',$fb_data->member_id);
518
+
519
+
520
+
521
+
522
+ } else {
523
+
524
+
525
+ $fb_data=json_decode($send_data);
526
+ $this->no_analytics_login($fb_data->email,$fb_data->given_name,$fb_data->family_name,'7','0');
527
+
528
+
529
+ }
530
+
531
+
532
+
533
+
534
+ }
535
+
536
+
537
+ }
538
+ }
539
+
540
+
541
+ public function no_analytics_login($fb_dataemail,$fb_datafirst_name,$fb_datalast_name,$is_from,$member_id)
542
  {
 
543
 
544
+
545
+ $resource = Mage::getSingleton('core/resource');
 
 
 
 
546
  $customer = Mage::getModel("customer/customer");
547
+ $websiteId = Mage::app()->getWebsite()->getId();
548
+
549
+ $helper = Mage::helper('socialloginsc');
550
+
551
+ if ($websiteId) {
552
+ $customer->setWebsiteId($websiteId);
553
+ }
554
+ $customer->loadByEmail($fb_dataemail);
555
+ if ($customer->getId()) {
556
  $is_new='0';
557
+ $username=$fb_dataemail;
558
+ $customer_id=$customer->getId();
559
  }
560
  else
561
  {
562
  $is_new='1';
563
  $store = Mage::app()->getStore();
564
 
565
+ //$customer->website_id = $websiteId;
566
  $customer->setStore($store);
567
  $password=rand("111111","9999999");
568
+ $customer->firstname = $fb_datafirst_name;
569
+ $customer->lastname = $fb_datalast_name;
570
+ $customer->email = $fb_dataemail;
571
  $customer->password_hash = md5($password);
572
  $customer->save();
573
+ $customer_id=$customer->getId();
574
+ $username=$fb_dataemail;
575
+
 
576
  }
577
 
 
578
  Mage::getModel('core/session', array('name' => 'frontend'));
 
 
579
  $customer->setCustomerActivated(true);
580
+ $customer->setData('password',$password);
581
+ $customer->save();
582
+ if($is_new=='1' && Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginregemail')=='1')
583
  {
584
  $customer->sendNewAccountEmail();
585
+
586
+ }
587
+
588
+ $this->getSession()->loginById($customer->getId());
589
+
590
+ if(Mage::getSingleton('customer/session')->isLoggedIn())
591
+ {
592
+
593
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
594
+
595
+ if($member_id!='0')
596
+ {
597
+ Mage::getSingleton('core/session')->setSocleverMemberId($member_id);
598
+ $helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?is_from=".$is_from."&siteUid=".$customer->getId()."&is_new=".$is_new."&member_id=".$member_id."&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&action=notifycs");
599
+ }
600
+
601
+ $redirect_location=($_COOKIE['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
602
+ if(isset($_COOKIE['lch']) && $_COOKIE['lch']!='')
603
  {
604
+ $redirect_location=$_COOKIE['lch'];
605
+ }
606
+
607
+ $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
608
+
609
+ if(!$isIosChrome) { ?>
610
+
611
  <script type="text/javascript">
612
+
613
+ setTimeout(function(){
614
+
615
+ opener.location.href="<?php echo $redirect_location;?>";
616
+ this.close();
617
+
618
+ },1000);
619
  </script>
620
  <?php
621
  }
622
+ else
623
+ {
 
 
 
 
 
624
 
625
+ ?>
626
+
627
+ <script type="text/javascript">
628
  window.location.href="<?php echo $redirect_location; ?>";
629
  </script>
630
+
631
+ <?php
632
 
633
+ }
634
+
635
+ }
636
+
637
+ }
638
+
639
+
640
+ public function yahoologinAction()
641
+ {
642
+ if(isset($_GET['lc']) && $_GET['lc']!='')
643
+ {
644
+ setcookie('lc',$_GET['lc'],time()+100,'/');
645
+ setcookie('lch',$_GET['lch'],time()-100,'/');
646
+
647
+ }
648
+ if(isset($_GET['lch']) && $_GET['lch']!='')
649
+ {
650
+ setcookie('lch',$_GET['lch'],time()+100,'/');
651
+ setcookie('lc',$_GET['lc'],time()-100,'/');
652
+
653
+ }
654
+
655
+ require 'openid.php';
656
+
657
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
658
+ if(strpos($file_headers[0], '200') !== false)
659
+ {
660
+ $soclever_on=1;
661
+ }
662
+ else
663
+ {
664
+ $soclever_on=0;
665
+ }
666
+
667
+ try
668
+ {
669
+
670
+
671
+ $openid = new LightOpenID($_SERVER['HTTP_HOST']);
672
+
673
+
674
+ if(!$openid->mode)
675
+ {
676
+
677
+ //do the login
678
+ if(isset($_GET['login']))
679
+ {
680
+ //The google openid url
681
+ $openid->identity = 'https://me.yahoo.com';
682
+
683
+ //Get additional google account information about the user , name , email , country
684
+ $openid->required = array('contact/email','person/guid','dob','birthDate','namePerson' , 'person/gender' , 'pref/language' , 'media/image/default','birthDate/birthday');
685
+
686
+ //start discovery
687
+
688
+
689
+ header('Location: ' . $openid->authUrl());
690
+ }
691
+
692
+
693
+ }
694
+
695
+ else if($openid->mode == 'cancel')
696
+ {
697
+ echo 'User has canceled authentication!';
698
+
699
+ }
700
+
701
+
702
+ else
703
+ {
704
+ if($openid->validate())
705
+ {
706
+
707
+ $d = $openid->getAttributes();
708
+
709
+
710
+ if($soclever_on == 1){
711
+
712
+
713
+
714
+
715
+ $helper=Mage::helper('socialloginsc');
716
+ $resPonse=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?is_yh=1&is_from=5&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode(json_encode($d)));
717
+
718
+ $fb_data=json_decode($resPonse);
719
+
720
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'5',$fb_data->member_id);
721
+
722
+
723
+
724
+
725
+ } else {
726
+
727
+
728
+ $name_Arr=explode(" ",$d['contact/email']);
729
+ $this->no_analytics_login($d['contact/email'] ,$name_Arr[0],$name_Arr[1],'5','0');
730
+
731
+
732
+ }
733
+
734
+
735
+ }
736
+ else
737
+ {
738
+
739
+ }
740
+ }
741
+ }
742
+
743
+ catch(ErrorException $e)
744
+ {
745
+ echo $e->getMessage();
746
+
747
+
748
+ }
749
+
750
+ }
751
+
752
+ public function scsl_general_login($response,$is_from,$email,$soclever_on)
753
+ {
754
+
755
+
756
+ $site_id=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid');
757
+ $helper = Mage::helper('socialloginsc');
758
+ if($is_from=='4' || $is_from=='11')
759
+ {
760
+ $action=($is_from=='4')?'trk_tw':'trk_vk';
761
+
762
+
763
+ if($soclever_on=='1')
764
+ {
765
+ $tw_login=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_twitter.php?action=".$action."&siteid=".$site_id."&email=".urlencode($email)."&tw_data=".urlencode($response)."");
766
+ if($tw_login)
767
+ {
768
+ $loginl_data=json_decode($tw_login);
769
+
770
+ $this->no_analytics_login($email,$loginl_data->first_name,$loginl_data->last_name,$is_from,$loginl_data->member_id);
771
+
772
+
773
+
774
+ }
775
+ }
776
+ else
777
+ {
778
+ $loginl_data=explode("~~~",$response);
779
+
780
+ $fname_arr=explode(" ",$loginl_data[0]);
781
+ $this->no_analytics_login($email,$fname_arr[0],$fname_arr[1],$is_from,'0');
782
+
783
+ }
784
+ }
785
+ }
786
+
787
+ public function msloginAction()
788
+ {
789
+ $helper = Mage::helper('socialloginsc');
790
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
791
+ if(strpos($file_headers[0], '200') !== false)
792
+ {
793
+ $soclever_on=1;
794
+ $get_fb=$helper->get_cscurl("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&is_ms=1");
795
+ $appData=explode("~",$get_fb);
796
+ $my_Api[0]=$appData[0];
797
+ $my_Api[1]=$appData[1];
798
+
799
+ }
800
+ else
801
+ {
802
+ $soclever_on=0;
803
+ $my_Api[0]=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscmsappid');
804
+ $my_Api[1]=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscmssecretkey');
805
+ }
806
+
807
+
808
+
809
+ require('http.php');
810
+ require('oauth_client.php');
811
+ $client = new oauth_client_class;
812
+ $client->server = 'Microsoft';
813
+ $client->redirect_uri = ''.Mage::getBaseUrl().'soclever_socialloginsc/index/mslogin';
814
+
815
+
816
+ $client->client_id = $my_Api[0];
817
+ $application_line = __LINE__;
818
+ $client->client_secret = $my_Api[1];
819
+
820
+
821
+
822
+ if(strlen($client->client_id) == 0
823
+ || strlen($client->client_secret) == 0)
824
+ die('Microsoft failed.');
825
+
826
+ /* API permissions
827
+ */
828
+ $client->scope = 'wl.basic wl.emails wl.birthday';
829
+ if(($success = $client->Initialize()))
830
+ {
831
+ if(($success = $client->Process()))
832
+ {
833
+ if(strlen($client->authorization_error))
834
+ {
835
+ $client->error = $client->authorization_error;
836
+ exit($client->error);
837
+ $success = false;
838
+ }
839
+ elseif(strlen($client->access_token))
840
+ {
841
+ $success = $client->CallAPI(
842
+ 'https://apis.live.net/v5.0/me',
843
+ 'GET', array(), array('FailOnAccessError'=>true), $user);
844
+ }
845
+ }
846
+ $success = $client->Finalize($success);
847
+ }
848
+ if($client->exit)
849
+ {
850
+ exit('Microsoft Login Failed');
851
+ }
852
+ if($success)
853
+ {
854
+
855
+ $your_data=json_encode($user);
856
+
857
+
858
+
859
+ if($soclever_on == 1){
860
+
861
+
862
+
863
+ $resPonse=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_register_new.php?is_ms=1&&siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&other=".urlencode($your_data));
864
+ $fb_data=json_decode($resPonse);
865
+
866
+ $this->no_analytics_login($fb_data->email,$fb_data->first_name,$fb_data->last_name,'8',$fb_data->member_id);
867
+
868
+
869
+
870
+
871
+ } else {
872
+
873
+
874
+ $content=json_decode($your_data);
875
+ $this->no_analytics_login($content->emails->account,$content->first_name,$content->last_name,'8','0');
876
+
877
+
878
+ }
879
+
880
+
881
+
882
+
883
+ }
884
+
885
+
886
+
887
+ }
888
+
889
+ public function twloginAction()
890
+ {
891
+ $site_id=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid');
892
+ if(isset($_GET['lc']) && $_GET['lc']!='')
893
+ {
894
+ setcookie('lc',$_GET['lc'],time()+100,'/');
895
+ setcookie('lch',$_GET['lch'],time()-100,'/');
896
+
897
  }
898
+ if(isset($_GET['lch']) && $_GET['lch']!='')
899
+ {
900
+ setcookie('lch',$_GET['lch'],time()+100,'/');
901
+ setcookie('lc',$_GET['lc'],time()-100,'/');
902
 
903
+ }
904
 
905
+ $helper = Mage::helper('socialloginsc');
906
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
907
+ if(strpos($file_headers[0], '200') !== false)
908
  {
909
+ $soclever_on=1;
910
+ $get_fb=$helper->get_cscurl("https://www.socleversocial.com/dashboard/get_fb_data.php?siteid=".Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid')."&is_tw=1");
911
+ $appData=explode("~",$get_fb);
912
+ $my_Api[0]=$appData[0];
913
+ $my_Api[1]=$appData[1];
914
+
915
+ }
916
+ else
917
  {
918
+ $soclever_on=0;
919
+ $my_Api[0]=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginsctwappid');
920
+ $my_Api[1]=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginsctwsecretkey');
921
+ }
922
+
923
+
924
+ if(isset($_POST['submit']) && $_POST['submit']=='Login' )
925
  {
926
+ $this->scsl_general_login($_POST['response_str'],'4',$_POST['email'],$soclever_on);
927
 
928
+ exit;
929
+ }
930
+
931
+
932
+ if($my_Api[0]!='0')
933
+ {
934
+
935
+ require('http.php');
936
+ require('oauth_client.php');
937
+ $client = new oauth_client_class;
938
+ $client->server = 'Twitter';
939
+ $client->redirect_uri = ''.Mage::getBaseUrl().'soclever_socialloginsc/index/twlogin';
940
 
941
+ $client->client_id = $my_Api[0];
942
+ $application_line = __LINE__;
943
+ $client->client_secret = $my_Api[1];
944
+
945
+
946
+
947
+ if(strlen($client->client_id) == 0
948
+ || strlen($client->client_secret) == 0)
949
+ die('twitter failed.');
950
+
951
+ /* API permissions
952
+ */
953
+ $client->scope = 'wl.basic wl.emails wl.birthday';
954
+ if(($success = $client->Initialize()))
955
  {
956
+ if(($success = $client->Process()))
 
 
957
  {
958
+ if(strlen($client->authorization_error))
959
+ {
960
+ $client->error = $client->authorization_error;
961
+ exit($client->error);
962
+ $success = false;
963
+ }
964
+ elseif(strlen($client->access_token))
965
+ {
966
+ $success = $client->CallAPI(
967
+ 'https://api.twitter.com/'. '1.1/account/'. 'verify_credentials.json',
968
+ 'GET', array(), array('FailOnAccessError'=>true), $user);
969
+ }
970
  }
971
+ $success = $client->Finalize($success);
 
972
  }
973
+ if($client->exit)
 
974
  {
975
+ exit('Twitter Login Failed');
976
+ }
977
+ if($success)
 
 
 
978
  {
979
+
980
+ $your_data=json_encode($user);
981
+ $content=json_decode($your_data);
982
+
983
+
984
+ $twitter_arr=array();
985
+ $twitter_arr['full_name']=$content->name;
986
+ $twitter_arr['profile_id']=$content->id;
987
+ $twitter_arr['screen_name']=$content->screen_name;
988
+ $twitter_arr['location']=$content->location;
989
+ $twitter_arr['description']=$content->description;
990
+ $twitter_arr['following_count']=$content->friends_count;
991
+ $twitter_arr['follower_count']=$content->followers_count;
992
+ $twitter_arr['tweet_count']=$content->statuses_count;
993
+ $twitter_arr['is_verified']=$content->verified;
994
+ $twitter_arr['lang']=$content->lang;
995
+ $twitter_arr['profile_pic']=$content->profile_image_url;
996
+ $twitter_arr['time_zone']=$content->time_zone;
997
+
998
+
999
+
1000
+ $chk_twitter=$helper->get_cscurl("https://www.socleversocial.com/dashboard/track_twitter.php?site_id=".$site_id."&twitter_id=".$twitter_arr['profile_id']."&action=chk_tw");
1001
+ //$chk_twitter='1';
1002
+ if($chk_twitter=='0' || $soclever_on=='0')
 
 
1003
  {
1004
+ ?>
1005
+ <style>
1006
+ #container_demo{
1007
+ text-align: left;
1008
+ margin: 0;
1009
+ padding: 0;
1010
+ margin: 0 auto;
1011
+ font-family: "Trebuchet MS","Myriad Pro",Arial,sans-serif;
1012
+ }
1013
+
1014
+ #wrapper{
1015
+
1016
+ right: 0px;
1017
+ height: 400px;
1018
+ margin: 0px auto;
1019
+
1020
+ position: relative;
1021
+ }
1022
+ #wrapper a{
1023
+ color: rgb(95, 155, 198);
1024
+ text-decoration: underline;
1025
+ }
1026
+
1027
+ #wrapper h1{
1028
+ font-size: 48px;
1029
+ color: rgb(6, 106, 117);
1030
+ padding: 2px 0 10px 0;
1031
+ font-family: 'FranchiseRegular','Arial Narrow',Arial,sans-serif;
1032
+ font-weight: bold;
1033
+ text-align: center;
1034
+ padding-bottom: 30px;
1035
+ }
1036
+
1037
+ #wrapper h1{
1038
+ background: -webkit-repeating-linear-gradient(-45deg,
1039
+ rgb(18, 83, 93) ,
1040
+ rgb(18, 83, 93) 20px,
1041
+ rgb(64, 111, 118) 20px,
1042
+ rgb(64, 111, 118) 40px,
1043
+ rgb(18, 83, 93) 40px);
1044
+ -webkit-text-fill-color: transparent;
1045
+ -webkit-background-clip: text;
1046
+ }
1047
+ #wrapper h1:after{
1048
+ content: ' ';
1049
+ display: block;
1050
+ width: 100%;
1051
+ height: 2px;
1052
+ margin-top: 10px;
1053
+ background: -moz-linear-gradient(left, rgba(147,184,189,0) 0%, rgba(147,184,189,0.8) 20%, rgba(147,184,189,1) 53%, rgba(147,184,189,0.8) 79%, rgba(147,184,189,0) 100%);
1054
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(147,184,189,0)), color-stop(20%,rgba(147,184,189,0.8)), color-stop(53%,rgba(147,184,189,1)), color-stop(79%,rgba(147,184,189,0.8)), color-stop(100%,rgba(147,184,189,0)));
1055
+ background: -webkit-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
1056
+ background: -o-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
1057
+ background: -ms-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
1058
+ background: linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
1059
+ }
1060
+
1061
+ #wrapper p{
1062
+ margin-bottom:15px;
1063
+ }
1064
+ #wrapper p:first-child{
1065
+ margin: 0px;
1066
+ }
1067
+ #wrapper label{
1068
+ color: rgb(64, 92, 96);
1069
+ position: relative;
1070
+ }
1071
+ ::-webkit-input-placeholder {
1072
+ color: rgb(190, 188, 188);
1073
+ font-style: italic;
1074
+ }
1075
+ input:-moz-placeholder,
1076
+ textarea:-moz-placeholder{
1077
+ color: rgb(190, 188, 188);
1078
+ font-style: italic;
1079
+ }
1080
+ input {
1081
+ outline: none;
1082
+ }
1083
+
1084
+
1085
+ #wrapper input:not([type="checkbox"]){
1086
+ width: 92%;
1087
+ margin-top: 4px;
1088
+ padding: 10px 5px 10px 32px;
1089
+ border: 1px solid rgb(178, 178, 178);
1090
+ -webkit-appearance: textfield;
1091
+ -webkit-box-sizing: content-box;
1092
+ -moz-box-sizing : content-box;
1093
+ box-sizing : content-box;
1094
+ -webkit-border-radius: 3px;
1095
+ -moz-border-radius: 3px;
1096
+ border-radius: 3px;
1097
+ -webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
1098
+ -moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
1099
+ box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
1100
+ -webkit-transition: all 0.2s linear;
1101
+ -moz-transition: all 0.2s linear;
1102
+ -o-transition: all 0.2s linear;
1103
+ transition: all 0.2s linear;
1104
+ }
1105
+
1106
+ /*styling both submit buttons */
1107
+ #wrapper p.button input{
1108
+ width: 30%;
1109
+ cursor: pointer;
1110
+ background: rgb(61, 157, 179);
1111
+ padding: 8px 5px;
1112
+ font-family: 'BebasNeueRegular','Arial Narrow',Arial,sans-serif;
1113
+ color: #fff;
1114
+ font-size: 24px;
1115
+ border: 1px solid rgb(28, 108, 122);
1116
+ margin-bottom: 10px;
1117
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
1118
+ -webkit-border-radius: 3px;
1119
+ -moz-border-radius: 3px;
1120
+ border-radius: 3px;
1121
+ -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
1122
+ 0px 0px 0px 3px rgb(254, 254, 254),
1123
+ 0px 5px 3px 3px rgb(210, 210, 210);
1124
+ -moz-box-shadow:0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
1125
+ 0px 0px 0px 3px rgb(254, 254, 254),
1126
+ 0px 5px 3px 3px rgb(210, 210, 210);
1127
+ box-shadow:0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
1128
+ 0px 0px 0px 3px rgb(254, 254, 254),
1129
+ 0px 5px 3px 3px rgb(210, 210, 210);
1130
+ -webkit-transition: all 0.2s linear;
1131
+ -moz-transition: all 0.2s linear;
1132
+ -o-transition: all 0.2s linear;
1133
+ transition: all 0.2s linear;
1134
+ }
1135
+ #wrapper p.button input:hover{
1136
+ background: rgb(74, 179, 198);
1137
+ }
1138
+ #wrapper p.button input:active,
1139
+ #wrapper p.button input:focus{
1140
+ background: rgb(40, 137, 154);
1141
+ position: relative;
1142
+ top: 1px;
1143
+ border: 1px solid rgb(12, 76, 87);
1144
+ -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
1145
+ -moz-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
1146
+ box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
1147
+ }
1148
+ p.login.button,
1149
+ p.signin.button{
1150
+ text-align: right;
1151
+ margin: 5px 0;
1152
+ }
1153
+
1154
+
1155
+
1156
+
1157
+ #login{
1158
+ position: absolute;
1159
+ top: 0px;
1160
+ width: 88%;
1161
+ padding: 18px 6% 60px 6%;
1162
+ margin: 0 0 35px 0;
1163
+ background: rgb(247, 247, 247);
1164
+ border: 1px solid rgba(147, 184, 189,0.8);
1165
+ -webkit-box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
1166
+ -moz-box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
1167
+ box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
1168
+ -webkit-box-shadow: 5px;
1169
+ -moz-border-radius: 5px;
1170
+ border-radius: 5px;
1171
+ }
1172
+
1173
+ #login{
1174
+ z-index: 22;
1175
+ }
1176
+ #toregister:target ~ #wrapper #register,
1177
+ #tologin:target ~ #wrapper #login{
1178
+ z-index: 22;
1179
+ -webkit-animation-name: fadeInLeft;
1180
+ -moz-animation-name: fadeInLeft;
1181
+ -ms-animation-name: fadeInLeft;
1182
+ -o-animation-name: fadeInLeft;
1183
+ animation-name: fadeInLeft;
1184
+ -webkit-animation-delay: .1s;
1185
+ -moz-animation-delay: .1s;
1186
+ -o-animation-delay: .1s;
1187
+ -ms-animation-delay: .1s;
1188
+ animation-delay: .1s;
1189
+ }
1190
+
1191
+ .lt8 #wrapper input{
1192
+ padding: 10px 5px 10px 32px;
1193
+ width: 92%;
1194
+ }
1195
+
1196
+ </style>
1197
+
1198
+ <div class="container">
1199
+
1200
+ <div class="codrops-top">
1201
+ <div class="clr"></div>
1202
+ </div>
1203
+ <section>
1204
+ <div id="container_demo" >
1205
+ <div id="wrapper">
1206
+ <div id="login" class="animate form">
1207
+ <form action="" autocomplete="on" method="post">
1208
+ <input type="hidden" name="response_str" value="<?php echo stripslashes(implode("~~~",$twitter_arr)); ?>" />
1209
+ <h1>You are almost done!</h1>
1210
+ <p>
1211
+ <label for="email" class="uname">Your email</label>
1212
+ <input id="email" name="email" required="required" type="text" placeholder="mymail@mail.com"/>
1213
+ </p>
1214
+
1215
 
1216
+ <p class="login button">
1217
+ <input type="submit" value="Login" name="submit" onclick="return chk_submit_email();" />
1218
+ </p>
 
 
1219
 
1220
+ </form>
1221
+ </div>
1222
+
1223
 
1224
+
1225
+ </div>
1226
+ </div>
1227
+ </section>
1228
+ </div>
1229
+ <script type="text/javascript">
1230
+
1231
+
1232
+ function isvalidemail_form(str){
1233
+
1234
+ var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-zA-Z]{2,6}(?:\.[a-zA-Z]{2})?)$/i
1235
+ return (filter.test(str));
1236
+ }
1237
 
1238
+ function isWhitespace(charToCheck) {
1239
+ var whitespaceChars = " \t\n\r\f";
1240
+ return (whitespaceChars.indexOf(charToCheck) != -1);
1241
  }
1242
+ function chk_submit_email()
1243
+ {
1244
+ var email=document.getElementById('email').value;
1245
+ if(!isWhitespace(email))
1246
+ {
1247
+ if(!isvalidemail_form(email))
1248
+ {
1249
+ alert("Please enter valid email address");
1250
+ return false;
1251
+ }
1252
+ }
1253
+ else
1254
+ {
1255
+ alert("Please provide your email address.");
1256
+ return false;
1257
+ }
1258
 
1259
 
1260
+ }
 
1261
 
1262
+ </script>
1263
+ <?php
1264
+ exit;
1265
  }
1266
  else
1267
  {
1268
+ $this->scsl_general_login(stripslashes(implode("~~~",$twitter_arr)),'4',$chk_twitter,$soclever_on);
1269
  }
1270
+
1271
  }
 
 
 
 
 
 
1272
 
1273
+ }
 
 
1274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1275
 
1276
+
1277
+
1278
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1279
  }
1280
+
1281
+
1282
+
1283
+
1284
  }
1285
  ?>
app/code/local/Soclever/Socialloginsc/etc/system.xml CHANGED
@@ -135,12 +135,20 @@
135
  <show_in_default>1</show_in_default>
136
  <show_in_website>1</show_in_website>
137
  <show_in_store>1</show_in_store>
138
- </buttonstylepp>
 
 
 
 
 
 
 
 
139
  <buttonsize translate="label">
140
  <label>Button Size</label>
141
  <frontend_type>select</frontend_type>
142
  <source_model>socialloginsc/providers::getsizes</source_model>
143
- <sort_order>207</sort_order>
144
  <show_in_default>1</show_in_default>
145
  <show_in_website>1</show_in_website>
146
  <show_in_store>1</show_in_store>
@@ -149,7 +157,7 @@
149
  <label>Select Providers</label>
150
  <frontend_type>multiselect</frontend_type>
151
  <source_model>socialloginsc/providers::getloginproviders</source_model>
152
- <sort_order>208</sort_order>
153
  <show_in_default>1</show_in_default>
154
  <show_in_website>1</show_in_website>
155
  <show_in_store>1</show_in_store>
@@ -158,7 +166,7 @@
158
  <label>Login Box Caption</label>
159
  <frontend_type>text</frontend_type>
160
  <comment><![CDATA[Text to display on social login box i.e Social Login By]]></comment>
161
- <sort_order>209</sort_order>
162
  <show_in_default>1</show_in_default>
163
  <show_in_website>1</show_in_website>
164
  <show_in_store>1</show_in_store>
@@ -168,7 +176,7 @@
168
  <frontend_type>select</frontend_type>
169
  <source_model>socialloginsc/providers::showpoweredby</source_model>
170
  <comment><![CDATA[At the bottom of login box will show "Powered By Socleversocial.com"]]></comment>
171
- <sort_order>210</sort_order>
172
  <show_in_default>1</show_in_default>
173
  <show_in_website>1</show_in_website>
174
  <show_in_store>1</show_in_store>
@@ -177,11 +185,119 @@
177
  <label>Send welcome email?</label>
178
  <frontend_type>select</frontend_type>
179
  <source_model>adminhtml/system_config_source_yesno</source_model>
180
- <sort_order>211</sort_order>
181
  <show_in_default>1</show_in_default>
182
  <show_in_website>1</show_in_website>
183
  <show_in_store>1</show_in_store>
184
  </socialloginregemail>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  </fields>
186
  </displaysettings>
187
  </groups>
135
  <show_in_default>1</show_in_default>
136
  <show_in_website>1</show_in_website>
137
  <show_in_store>1</show_in_store>
138
+ </buttonstylepp>
139
+ <buttonstylems translate="label">
140
+ <label>Microsoft</label>
141
+ <frontend_type>text</frontend_type>
142
+ <sort_order>207</sort_order>
143
+ <show_in_default>1</show_in_default>
144
+ <show_in_website>1</show_in_website>
145
+ <show_in_store>1</show_in_store>
146
+ </buttonstylems>
147
  <buttonsize translate="label">
148
  <label>Button Size</label>
149
  <frontend_type>select</frontend_type>
150
  <source_model>socialloginsc/providers::getsizes</source_model>
151
+ <sort_order>307</sort_order>
152
  <show_in_default>1</show_in_default>
153
  <show_in_website>1</show_in_website>
154
  <show_in_store>1</show_in_store>
157
  <label>Select Providers</label>
158
  <frontend_type>multiselect</frontend_type>
159
  <source_model>socialloginsc/providers::getloginproviders</source_model>
160
+ <sort_order>308</sort_order>
161
  <show_in_default>1</show_in_default>
162
  <show_in_website>1</show_in_website>
163
  <show_in_store>1</show_in_store>
166
  <label>Login Box Caption</label>
167
  <frontend_type>text</frontend_type>
168
  <comment><![CDATA[Text to display on social login box i.e Social Login By]]></comment>
169
+ <sort_order>309</sort_order>
170
  <show_in_default>1</show_in_default>
171
  <show_in_website>1</show_in_website>
172
  <show_in_store>1</show_in_store>
176
  <frontend_type>select</frontend_type>
177
  <source_model>socialloginsc/providers::showpoweredby</source_model>
178
  <comment><![CDATA[At the bottom of login box will show "Powered By Socleversocial.com"]]></comment>
179
+ <sort_order>310</sort_order>
180
  <show_in_default>1</show_in_default>
181
  <show_in_website>1</show_in_website>
182
  <show_in_store>1</show_in_store>
185
  <label>Send welcome email?</label>
186
  <frontend_type>select</frontend_type>
187
  <source_model>adminhtml/system_config_source_yesno</source_model>
188
+ <sort_order>311</sort_order>
189
  <show_in_default>1</show_in_default>
190
  <show_in_website>1</show_in_website>
191
  <show_in_store>1</show_in_store>
192
  </socialloginregemail>
193
+ <socialloginscfbappid translate="label">
194
+ <label>Facebook App. ID</label>
195
+ <frontend_type>text</frontend_type>
196
+ <comment><![CDATA[Facebook Application ID]]></comment>
197
+ <sort_order>312</sort_order>
198
+ <show_in_default>1</show_in_default>
199
+ <show_in_website>1</show_in_website>
200
+ <show_in_store>1</show_in_store>
201
+ </socialloginscfbappid>
202
+ <socialloginscfbsecretkey translate="label">
203
+ <label>Facebook App. Secret</label>
204
+ <frontend_type>text</frontend_type>
205
+ <comment><![CDATA[Facebook Application Secret]]></comment>
206
+ <sort_order>313</sort_order>
207
+ <show_in_default>1</show_in_default>
208
+ <show_in_website>1</show_in_website>
209
+ <show_in_store>1</show_in_store>
210
+ </socialloginscfbsecretkey>
211
+ <socialloginscppappid translate="label">
212
+ <label>Paypal Client ID</label>
213
+ <frontend_type>text</frontend_type>
214
+ <comment><![CDATA[Paypal Client ID]]></comment>
215
+ <sort_order>314</sort_order>
216
+ <show_in_default>1</show_in_default>
217
+ <show_in_website>1</show_in_website>
218
+ <show_in_store>1</show_in_store>
219
+ </socialloginscppappid>
220
+ <socialloginscppsecretkey translate="label">
221
+ <label>Paypal Secret</label>
222
+ <frontend_type>text</frontend_type>
223
+ <comment><![CDATA[Paypal Application Secret]]></comment>
224
+ <sort_order>315</sort_order>
225
+ <show_in_default>1</show_in_default>
226
+ <show_in_website>1</show_in_website>
227
+ <show_in_store>1</show_in_store>
228
+ </socialloginscppsecretkey>
229
+ <socialloginscgpappid translate="label">
230
+ <label>Google+ Client ID</label>
231
+ <frontend_type>text</frontend_type>
232
+ <comment><![CDATA[Google+ Client ID]]></comment>
233
+ <sort_order>316</sort_order>
234
+ <show_in_default>1</show_in_default>
235
+ <show_in_website>1</show_in_website>
236
+ <show_in_store>1</show_in_store>
237
+ </socialloginscgpappid>
238
+ <socialloginscgpsecretkey translate="label">
239
+ <label>Google+ Client Secret</label>
240
+ <frontend_type>text</frontend_type>
241
+ <comment><![CDATA[Google+ Client Secret]]></comment>
242
+ <sort_order>317</sort_order>
243
+ <show_in_default>1</show_in_default>
244
+ <show_in_website>1</show_in_website>
245
+ <show_in_store>1</show_in_store>
246
+ </socialloginscgpsecretkey>
247
+ <socialloginscliappid translate="label">
248
+ <label>LinkedIN Client ID</label>
249
+ <frontend_type>text</frontend_type>
250
+ <comment><![CDATA[LinkedIN Client ID]]></comment>
251
+ <sort_order>318</sort_order>
252
+ <show_in_default>1</show_in_default>
253
+ <show_in_website>1</show_in_website>
254
+ <show_in_store>1</show_in_store>
255
+ </socialloginscliappid>
256
+ <socialloginsclisecretkey translate="label">
257
+ <label>LinkedIN Client Secret</label>
258
+ <frontend_type>text</frontend_type>
259
+ <comment><![CDATA[LinkedIN Client Secret]]></comment>
260
+ <sort_order>319</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>1</show_in_website>
263
+ <show_in_store>1</show_in_store>
264
+ </socialloginsclisecretkey>
265
+ <socialloginsctwappid translate="label">
266
+ <label>Twitter Consumer Key (API Key)</label>
267
+ <frontend_type>text</frontend_type>
268
+ <comment><![CDATA[Twitter Consumer Key (API Key)]]></comment>
269
+ <sort_order>320</sort_order>
270
+ <show_in_default>1</show_in_default>
271
+ <show_in_website>1</show_in_website>
272
+ <show_in_store>1</show_in_store>
273
+ </socialloginsctwappid>
274
+ <socialloginsctwsecretkey translate="label">
275
+ <label>Twitter Consumer Secret (API Secret)</label>
276
+ <frontend_type>text</frontend_type>
277
+ <comment><![CDATA[Twitter Consumer Secret (API Secret)]]></comment>
278
+ <sort_order>321</sort_order>
279
+ <show_in_default>1</show_in_default>
280
+ <show_in_website>1</show_in_website>
281
+ <show_in_store>1</show_in_store>
282
+ </socialloginsctwsecretkey>
283
+ <socialloginscmsappid translate="label">
284
+ <label>Microsoft Client ID</label>
285
+ <frontend_type>text</frontend_type>
286
+ <comment><![CDATA[Microsoft Client ID]]></comment>
287
+ <sort_order>322</sort_order>
288
+ <show_in_default>1</show_in_default>
289
+ <show_in_website>1</show_in_website>
290
+ <show_in_store>1</show_in_store>
291
+ </socialloginscmsappid>
292
+ <socialloginscmssecretkey translate="label">
293
+ <label>Microsoft Client Secret</label>
294
+ <frontend_type>text</frontend_type>
295
+ <comment><![CDATA[Microsoft Client Secret]]></comment>
296
+ <sort_order>323</sort_order>
297
+ <show_in_default>1</show_in_default>
298
+ <show_in_website>1</show_in_website>
299
+ <show_in_store>1</show_in_store>
300
+ </socialloginscmssecretkey>
301
  </fields>
302
  </displaysettings>
303
  </groups>
app/code/local/Soclever/Socialloginsc/others/image/fb_img_top.jpg ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/scfb.png ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/scgp.png ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/scli.png ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/scms.png ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/scpp.png ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/sctw.png ADDED
Binary file
app/code/local/Soclever/Socialloginsc/others/image/scyh.png ADDED
Binary file
app/design/frontend/base/default/template/socialloginsc/scsl_buttons.phtml CHANGED
@@ -10,25 +10,196 @@ $loginboxcaption=Mage::getStoreConfig('socialloginsc_options/displaysettings/soc
10
  $showpoweredby=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscpowerby');
11
 
12
  $is_validated=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_validated');
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscproviders');
15
 
16
  if($is_validated=='1' && $selected_providers!='' && $selected_providers!='0')
17
  {
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  if(strtolower($btn_style)=='custom')
20
  {
21
- $provider_arr=explode(",",$selected_providers);
22
  $fbpath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylefb');
23
  $gppath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylegp');
24
  $lipath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstyleli');
25
  $twpath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstyletw');
26
  $yhpath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstyleyh');
27
  $pppath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylepp');
 
 
28
  $gapi=file_get_contents('https://www.socleversocial.com/dashboard/get_fb_data.php?action=gapi&siteid='.$site_id.'');
29
  if(in_array('2',$provider_arr) && !empty($fbpath))
30
  {
 
31
  $bg_position=$btn_width;
 
32
  $fb_div .='<script type="text/javascript">';
33
  $imgdiv='<div style="float: left; margin-right: 10px;margin-top: 10px;"><img src="'.$fbpath.'" alt="Login with Facebook" title="Login with Facebook""></div>';
34
  $fb_div .='csbutton.init([\''.$imgdiv.'\',\'100%\' ,\'100%\',\'login_fb\']);'.PHP_EOL;
@@ -60,6 +231,18 @@ $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/
60
 
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  $tw_div="";
64
  if(!empty($twpath) && in_array('13',$provider_arr))
65
  {
@@ -95,7 +278,7 @@ $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/
95
 
96
  }
97
 
98
- $imgdiv='<script type="text/javascript" src="https://www.socleversocial.com/dashboard/client_share_js/csloginbuttonsonlysc_'.$site_id.'.js"></script>'.PHP_EOL.$fb_div.PHP_EOL.$gp_div.PHP_EOL.$li_div.PHP_EOL.$tw_div.PHP_EOL.$yh_div.PHP_EOL.$ig_div.PHP_EOL.$pp_div;
99
 
100
 
101
 
@@ -113,7 +296,8 @@ $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/
113
  }
114
  else
115
  {
116
- $valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_login_buttons.php?login_only=2&site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&rt=gp&bcaption=".base64_encode($loginboxcaption)."&bshow=".$showpoweredby."&bstyle=".$btn_style."&bsize=".$button_size."&providers=".$selected_providers);
 
117
 
118
  if($valid_data && $valid_data!='0~~0')
119
  {
@@ -124,6 +308,12 @@ $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/
124
  echo"";
125
  }
126
  }
 
 
 
 
 
 
127
  }
128
  echo"";
129
 
@@ -138,20 +328,3 @@ $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/
138
  ?>
139
 
140
 
141
-
142
-
143
-
144
- <script type="text/javascript">
145
- function popupCenter(url) {
146
- var title='Login with twitter';
147
- var w=600;
148
- var h=436;
149
- var left = (screen.width/2)-(w/2);
150
- var top = (screen.height/2)-(h/2);
151
- return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
152
- }
153
- function showPopup(url){
154
- win = new Window({ title: "Login With Twitter", url:url, zIndex:3000, destroyOnClose: true, recenterAuto:false, resizable: false, width:450, height:473, minimizable: false, maximizable: false, draggable: false});
155
- win.showCenter(true);
156
- }
157
- </script>
10
  $showpoweredby=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscpowerby');
11
 
12
  $is_validated=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_validated');
13
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
14
+ if(strpos($file_headers[0], '200') !== false)
15
+ {
16
+ $soclever_on=1;
17
+
18
+ }
19
+ else
20
+ {
21
+ $is_validated=1;
22
+ $soclever_on=0;
23
+ }
24
 
25
  $selected_providers=Mage::getStoreConfig('socialloginsc_options/displaysettings/socialloginscproviders');
26
 
27
  if($is_validated=='1' && $selected_providers!='' && $selected_providers!='0')
28
  {
29
 
30
+ $provider_arr=explode(",",$selected_providers);
31
+
32
+
33
+ if($soclever_on==0)
34
+ {
35
+ $lc=(strpos($_SERVER['REQUEST_URI'],'checkout'))?'c':'l';
36
+ $imgdiv='<script type="text/javascript">
37
+ if(typeof cspopupCenterMagentoLogin != \'function\' )
38
+ {
39
+ function cspopupCenterMagentoLogin(url, title, w, h) {
40
+ var left = (screen.width/2)-(w/2);
41
+ var top = (screen.height/2)-(h/2);
42
+ return window.open(url, title, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=\'+w+\', height=\'+h+\', top=\'+top+\', left=\'+left);
43
+ }
44
+ }
45
+ if(typeof csgalogintrack != \'function\' )
46
+ {
47
+ function csgalogintrack(social_media,csclient_id)
48
+ {
49
+
50
+ if(window.ga && ga.create)
51
+ {
52
+
53
+
54
+ ga(\'send\', {\'hitType\': \'event\',
55
+ \'eventCategory\': \'SocleverSocial\',
56
+ \'eventAction\': \'Login\',
57
+ \'eventLabel\': social_media,
58
+ \'eventValue\': csclient_id
59
+ });
60
+ }
61
+ else if (window._gaq)
62
+ {
63
+
64
+ _gaq.push([\'_trackEvent\', \'SocleverSocial\',\'Login\',social_media,csclient_id])
65
+
66
+ }
67
+
68
+ }
69
+ }
70
+ </script>
71
+ ';
72
+ $imgdiv .=PHP_EOL;
73
+ $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
74
+ if(in_array('2',$provider_arr))
75
+ {
76
+
77
+ if($isIosChrome)
78
+ {
79
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Facebook\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/fblogin?lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scfb.png" alt="Login with Facebook" title="Login with Facebook"" style="width:40px;"></a></div>';
80
+ }
81
+ else
82
+ {
83
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Facebook\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/fblogin?lc='.$lc.'\',\'Login With FB\',\'400\',\'300\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scfb.png" alt="Login with Facebook" title="Login with Facebook"" style="width:40px;"></a></div>';
84
+ }
85
+ $imgdiv .=PHP_EOL;
86
+
87
+ }
88
+ if(in_array('4',$provider_arr))
89
+ {
90
+
91
+ if($isIosChrome)
92
+ {
93
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Google+\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/gplogin?lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scgp.png" alt="Login with Google+" title="Login with Google+"" style="width:40px;"></a></div>';
94
+ }
95
+ else
96
+ {
97
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Google+\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/gplogin?lc='.$lc.'\',\'Login With Google+\',\'400\',\'300\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scgp.png" alt="Login with Google+" title="Login with Google+"" style="width:40px;"></a></div>';
98
+ }
99
+ $imgdiv .=PHP_EOL;
100
+
101
+ }
102
+ if(in_array('7',$provider_arr))
103
+ {
104
+
105
+ if($isIosChrome)
106
+ {
107
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'LinkedIN\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/lilogin?lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scli.png" alt="Login with LinkedIN!" title="Login with LinkedIN!"" style="width:40px;"></a></div>';
108
+ }
109
+ else
110
+ {
111
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'LinkedIN\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/lilogin?lc='.$lc.'\',\'Login With FB\',\'400\',\'500\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scli.png" alt="Login with LinkedIN" title="Login with LinkedIN"" style="width:40px;"></a></div>';
112
+ }
113
+ $imgdiv .=PHP_EOL;
114
+
115
+ }
116
+ if(in_array('8',$provider_arr))
117
+ {
118
+
119
+ if($isIosChrome)
120
+ {
121
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Microsoft\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/mslogin?lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scms.png" alt="Login with Microsoft" title="Login with Microsoft"" style="width:40px;"></a></div>';
122
+ }
123
+ else
124
+ {
125
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Microsoft\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/mslogin?lc='.$lc.'\',\'Login With FB\',\'400\',\'500\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scms.png" alt="Login with Microsoft" title="Login with Microsoft" style="width:40px;"></a></div>';
126
+ }
127
+ $imgdiv .=PHP_EOL;
128
+
129
+ }
130
+ if(in_array('13',$provider_arr))
131
+ {
132
+
133
+ if($isIosChrome)
134
+ {
135
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Twitter\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/twlogin?lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/sctw.png" alt="Login with Twitter" title="Login with Twitter"" style="width:40px;"></a></div>';
136
+ }
137
+ else
138
+ {
139
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Twitter\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/twlogin?lc='.$lc.'\',\'Login With FB\',\'600\',\'400\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/sctw.png" alt="Login with Twitter" title="Login with Twitter" style="width:40px;"></a></div>';
140
+ }
141
+ $imgdiv .=PHP_EOL;
142
+
143
+ }
144
+ if(in_array('16',$provider_arr))
145
+ {
146
+
147
+ if($isIosChrome)
148
+ {
149
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'PayPal\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/paypallogin?lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scpp.png" alt="Login with PayPal" title="Login with PayPal"" style="width:40px;"></a></div>';
150
+ }
151
+ else
152
+ {
153
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'PayPal\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/paypallogin?lc='.$lc.'\',\'Login With FB\',\'600\',\'500\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scpp.png" alt="Login with PayPal" title="Login with PayPal"" style="width:40px;"></a></div>';
154
+ }
155
+ $imgdiv .=PHP_EOL;
156
+
157
+ }
158
+ if(in_array('15',$provider_arr))
159
+ {
160
+
161
+ if($isIosChrome)
162
+ {
163
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Yahoo\',\''.$site_id.'\');" href=\''.Mage::getBaseUrl().'soclever_socialloginsc/index/yahoologin?login=1&lc='.$lc.'\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scyh.png" alt="Login with Yahoo!" title="Login with Yahoo!"" style="width:40px;"></a></div>';
164
+ }
165
+ else
166
+ {
167
+ $imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px;"><a onclick="csgalogintrack(\'Yahoo\',\''.$site_id.'\');cspopupCenterMagentoLogin(\''.Mage::getBaseUrl().'soclever_socialloginsc/index/yahoologin?login=1&lc='.$lc.'\',\'Login With FB\',\'600\',\'500\');" href=\'javascript:void(0)\'><img src="'.Mage::getBaseUrl().'soclever_socialloginsc/index/get/t/image/f/scyh.png" alt="Login with Yahoo" title="Login with Yahoo"" style="width:40px;"></a></div>';
168
+ }
169
+ $imgdiv .=PHP_EOL;
170
+
171
+ }
172
+ $display_buttons='<div style="margin-bottom:20px;width:52%;margin-bottom:10px;border:0px solid #bbb6a5;clear:both;overflow:hidden;height:1%;"><div><b>'.$loginboxcaption.'</b></div>'.$imgdiv.'';
173
+ if($showpoweredby=='1')
174
+ {
175
+ $display_buttons .='<div style="clear: both;text-align:left;padding-top:10px;"><b>Powered by </b><a href="https://www.socleversocial.com/" target="_blank">Socleversocial.com</a></div>';
176
+ }
177
+ $display_buttons .='</div>';
178
+
179
+ echo $display_buttons;
180
+ }
181
+ else
182
+ {
183
+
184
+
185
+
186
  if(strtolower($btn_style)=='custom')
187
  {
188
+
189
  $fbpath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylefb');
190
  $gppath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylegp');
191
  $lipath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstyleli');
192
  $twpath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstyletw');
193
  $yhpath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstyleyh');
194
  $pppath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylepp');
195
+ $mspath=Mage::getStoreConfig('socialloginsc_options/displaysettings/buttonstylems');
196
+
197
  $gapi=file_get_contents('https://www.socleversocial.com/dashboard/get_fb_data.php?action=gapi&siteid='.$site_id.'');
198
  if(in_array('2',$provider_arr) && !empty($fbpath))
199
  {
200
+
201
  $bg_position=$btn_width;
202
+
203
  $fb_div .='<script type="text/javascript">';
204
  $imgdiv='<div style="float: left; margin-right: 10px;margin-top: 10px;"><img src="'.$fbpath.'" alt="Login with Facebook" title="Login with Facebook""></div>';
205
  $fb_div .='csbutton.init([\''.$imgdiv.'\',\'100%\' ,\'100%\',\'login_fb\']);'.PHP_EOL;
231
 
232
  }
233
 
234
+ $ms_div="";
235
+ if(!empty($mspath) && in_array('8',$provider_arr))
236
+ {
237
+
238
+ $ms_div .='<script type="text/javascript">';
239
+ $imgdiv='<div style="float: left; margin-right: 10px;margin-top: 10px;"><img src="'.$mspath.'" alt="Login with Microsoft" title="Login with Microsoft""></div>';
240
+ $ms_div .='csbutton.init([\''.$imgdiv.'\',\'100%\' ,\'100%\',\'login\',\'ms\']);'.PHP_EOL;
241
+ $ms_div .='csbutton.putCsbutton();
242
+ </script>';
243
+
244
+ }
245
+
246
  $tw_div="";
247
  if(!empty($twpath) && in_array('13',$provider_arr))
248
  {
278
 
279
  }
280
 
281
+ $imgdiv='<script type="text/javascript" src="https://www.socleversocial.com/dashboard/client_share_js/csloginbuttonsonlysc_'.$site_id.'.js"></script>'.PHP_EOL.$fb_div.PHP_EOL.$gp_div.PHP_EOL.$li_div.PHP_EOL.$ms_div.PHP_EOL.$tw_div.PHP_EOL.$yh_div.PHP_EOL.$ig_div.PHP_EOL.$pp_div;
282
 
283
 
284
 
296
  }
297
  else
298
  {
299
+ $helper=Mage::helper('socialloginsc');
300
+ $valid_data=$helper->get_cscurl("https://www.socleversocial.com/dashboard/mage_login_buttons.php?login_only=2&site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&rt=gp&bcaption=".base64_encode($loginboxcaption)."&bshow=".$showpoweredby."&bstyle=".$btn_style."&bsize=".$button_size."&providers=".$selected_providers);
301
 
302
  if($valid_data && $valid_data!='0~~0')
303
  {
308
  echo"";
309
  }
310
  }
311
+
312
+
313
+
314
+ }
315
+
316
+
317
  }
318
  echo"";
319
 
328
  ?>
329
 
330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/socialloginsc/socialloginsc_fb.phtml CHANGED
@@ -1,2 +1,3 @@
1
- <?php
2
- ?>
 
1
+ <?php
2
+
3
+ ?>
app/design/frontend/base/default/template/socialloginsc/socialloginsc_head.phtml CHANGED
@@ -1,15 +1,3 @@
1
  <?php
2
- $is_validated=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_validated');
3
- if($is_validated=='1')
4
- {
5
- if(!Mage::getSingleton('customer/session')->isLoggedIn())
6
- {
7
- echo'<script type="text/javascript" src="https://www.socleversocial.com/dashboard/client_share_js/client_'.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid').'_onlysclogin.js"></script>'.PHP_EOL.
8
- '<script type="text/javascript">'.PHP_EOL.
9
- 'csloginjs.init([\''.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appid').'\', \''.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid').'\',\''.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appsecret').'\',\''.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_validdomain').'\']);'.PHP_EOL.
10
- 'csloginjs.validateCsApi();'.PHP_EOL.
11
- '</script>'.PHP_EOL;
12
-
13
- }
14
- }
15
- ?>
1
  <?php
2
+
3
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/socialloginsc/socialloginsc_trackpixel.phtml CHANGED
@@ -1,6 +1,19 @@
1
  <?php
2
  $is_validated=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_validated');
3
- if($is_validated=='1')
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  {
5
  $CsorderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
6
  $Csorder = Mage::getModel('sales/order')->loadByIncrementId($CsorderId);
1
  <?php
2
  $is_validated=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_validated');
3
+
4
+ $file_headers = get_headers("https://www.socleversocial.com/dashboard/scon.php");
5
+ if(strpos($file_headers[0], '200') !== false)
6
+ {
7
+ $soclever_on=1;
8
+
9
+ }
10
+ else
11
+ {
12
+ $is_validated=1;
13
+ $soclever_on=0;
14
+ }
15
+
16
+ if($is_validated=='1' && $soclever_on==1)
17
  {
18
  $CsorderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
19
  $Csorder = Mage::getModel('sales/order')->loadByIncrementId($CsorderId);
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>soclever_login</name>
4
- <version>1.3.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -30,9 +30,9 @@ Send personalised message to your visitors by using our birthday reports. &lt;/p
30
  Our asynchronous javascript loads faster without interfearing with the display or behaviour of the page. Dynamic JavaScript makes it easy to choose/sort social netork buttons for display.&lt;/p&gt;</description>
31
  <notes>Ability to add custom images/icons for social networks</notes>
32
  <authors><author><name>Soclever Social</name><user>Socleversocial</user><email>hemang@socleversocial.com</email></author></authors>
33
- <date>2015-06-30</date>
34
- <time>13:29:01</time>
35
- <contents><target name="magelocal"><dir name="Soclever"><dir name="Socialloginsc"><dir name="Block"><file name="Help.php" hash="f1b78eeb8572b294f147100852341b66"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslshow.php" hash="c24f579bd6899fda1b4dfbb745c96f4b"/><file name="Scslfooter.php" hash="be0ebf4b090e0843e8d4c2039babed03"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Customopt1toggle.php" hash="7ffea7dbf09067027228eb243bacb818"/></dir></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="9aaabda855c6d4888525b7c4c9d77480"/><file name="openid.php" hash="421d5936957b8ddda543b679d1876f04"/><file name="http.php" hash="1fe6b6ac5002ed03f3bb5e7f623b8682"/><file name="oauth_client.php" hash="c8b0e317336ba0dce0fee2e384987785"/></dir><dir name="etc"><file name="config.xml" hash="cb074a4803cd4bc99dc8cf6f9496c165"/><file name="system.xml" hash="757de00fb4455d7097d552bc94f11ebe"/></dir><dir name="Helper"><file name="Data.php" hash="ffe3beab121640dedd47db758a93fdaf"/></dir><dir name="Model"><file name="Providers.php" hash="78908f39984603c3ee9be750c51d4044"/><file name="Info.php" hash="a6af76a1fec277eb2e1d1055e6a447b4"/><file name="Observer.php" hash="270ecaad4d5b460e4f34f64142b5159f"/></dir></dir><dir name="Sociallogin"><dir name="Block"><file name="Scsltrackpixel.php" hash=""/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="socialloginsc.xml" hash="49234a63b798f35e405ddfa9f603ba4c"/></dir><dir name="template"><dir name="socialloginsc"><file name="scsl_buttons.phtml" hash="1626ae90199fc681593523a985629eb0"/><file name="sociallogin_head.phtml" hash=""/><file name="sociallogin_fb.phtml" hash=""/><file name="sociallogin_trackpixel.phtml" hash=""/><file name="socialloginsc_fb.phtml" hash="718d8596a14d123d83afb0d5d6d6fd96"/><file name="socialloginsc_footer.phtml" hash="84220f1f371fcd70cb8aa49d0d19eefe"/><file name="socialloginsc_head.phtml" hash="16d2186c311b2f7643e5cbc65dab7e2f"/><file name="socialloginsc_trackpixel.phtml" hash="4ec45f934b23b5e1961e409530d51672"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="soclever_socialloginsc.xml" hash="4bc33a8062ab5eabf3f3edf1e474c400"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
38
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>soclever_login</name>
4
+ <version>1.4.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
30
  Our asynchronous javascript loads faster without interfearing with the display or behaviour of the page. Dynamic JavaScript makes it easy to choose/sort social netork buttons for display.&lt;/p&gt;</description>
31
  <notes>Ability to add custom images/icons for social networks</notes>
32
  <authors><author><name>Soclever Social</name><user>Socleversocial</user><email>hemang@socleversocial.com</email></author></authors>
33
+ <date>2015-11-18</date>
34
+ <time>10:00:55</time>
35
+ <contents><target name="magelocal"><dir name="Soclever"><dir name="Socialloginsc"><dir name="Block"><file name="Help.php" hash="f1b78eeb8572b294f147100852341b66"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslshow.php" hash="c24f579bd6899fda1b4dfbb745c96f4b"/><file name="Scslfooter.php" hash="be0ebf4b090e0843e8d4c2039babed03"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Customopt1toggle.php" hash="729f5a574ae3621d11ef32812c965513"/></dir></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="0d99c2596fc145a01b603da53858f759"/><file name="openid.php" hash="421d5936957b8ddda543b679d1876f04"/><file name="http.php" hash="1fe6b6ac5002ed03f3bb5e7f623b8682"/><file name="oauth_client.php" hash="c8b0e317336ba0dce0fee2e384987785"/></dir><dir name="etc"><file name="config.xml" hash="cb074a4803cd4bc99dc8cf6f9496c165"/><file name="system.xml" hash="e7f85c319d7e0b317627869131514da4"/></dir><dir name="Helper"><file name="Data.php" hash="d0da8d4c47368e8c5291333ee27c0c40"/></dir><dir name="Model"><file name="Providers.php" hash="62151b3f8dc1ec090164e280dceaf3d5"/><file name="Info.php" hash="3228abd8cecf80d9e2cca056e1d39ee3"/><file name="Observer.php" hash="b8eb997ca341366dfbdb6aaedcbc0013"/></dir><dir name="others"><dir name="image"><file name="fb_img_top.jpg" hash="4d562496529ee94898f0ee1d555c90a1"/><file name="scfb.png" hash="ff50fc060d6524cd2b8135a92a6a6ff4"/><file name="scgp.png" hash="88c63a1b499009b7b33eae5b4ef247cc"/><file name="scli.png" hash="5522b04e45c5a7db249b34ecde455221"/><file name="scms.png" hash="fefd42a5f18f05a532864c5198ecdb96"/><file name="scpp.png" hash="3cc703493710e93f128ab97c41494801"/><file name="sctw.png" hash="c09c726a46be416e971284bdb62f6d6b"/><file name="scyh.png" hash="ae35475d27e8d90c8d8f218a38962c22"/></dir></dir></dir><dir name="Sociallogin"><dir name="Block"><file name="Scsltrackpixel.php" hash=""/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="socialloginsc.xml" hash="49234a63b798f35e405ddfa9f603ba4c"/></dir><dir name="template"><dir name="socialloginsc"><file name="scsl_buttons.phtml" hash="df3464205d5bd10dda902310e543b30f"/><file name="sociallogin_head.phtml" hash=""/><file name="sociallogin_fb.phtml" hash=""/><file name="sociallogin_trackpixel.phtml" hash=""/><file name="socialloginsc_fb.phtml" hash="a3d3c477cf26c0900a39583d000ffe35"/><file name="socialloginsc_footer.phtml" hash="84220f1f371fcd70cb8aa49d0d19eefe"/><file name="socialloginsc_head.phtml" hash="320918455bc00b2a361c49e66fa66410"/><file name="socialloginsc_trackpixel.phtml" hash="01df73cc7e13b48db974e20f03dd944f"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="soclever_socialloginsc.xml" hash="4bc33a8062ab5eabf3f3edf1e474c400"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
38
  </package>