Changeset 1367081
- Timestamp:
- 03/08/2016 09:11:25 PM (10 years ago)
- Location:
- uberkeen/trunk
- Files:
-
- 1 deleted
- 1 edited
-
error_activation.txt (deleted)
-
uberkeen.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uberkeen/trunk/uberkeen.php
r1367072 r1367081 4 4 Plugin URI: https://uberkeen.com 5 5 Description: Un plugin de communication live 6 Version: 1.026 Version: 0.1 7 7 Author: Jean Duez 8 8 Author URI: https://uberkeen.com … … 14 14 15 15 16 add_action('activated_plugin','my_save_error');17 function my_save_error()18 {19 file_put_contents(dirname(__file__).'error_activation.txt', ob_get_contents());20 }21 16 22 17 … … 39 34 $mes_above = $print->mes_above; 40 35 $mes_open = $print->mes_open; 41 $ button_style = $print->button_style;36 $mes_close = $print->mes_close; 42 37 } 43 38 44 39 echo $mes_above; 45 echo " <br><button style='". $button_style ."' onclick='uberkeen_myFunction()'>". $mes_open ."</button>";40 echo " <br><button class='button2' onclick='uberkeen_myFunction()'>". $mes_open ."</button><br><v> <a href='https://www.uberkeen.com'>uberkeen.com</a> gateway </v>"; 46 41 47 42 ?> 48 43 49 44 45 <style> 46 .button2 { 47 background: #3e779d; 48 color: #fff; 49 box-shadow:none; 50 margin-bottom: -50%; 51 } 52 v { 53 background: #9CC2DB; 54 color: #777; 55 font-size: 11px; 56 } 57 </style> 50 58 51 59 … … 58 66 59 67 <?php 60 68 ; 61 69 } 62 70 … … 85 93 $mes_above = $print->mes_above; 86 94 $mes_open = $print->mes_open; 87 $ button_style = $print->button_style;95 $mes_close = $print->mes_close; 88 96 } 89 97 … … 105 113 mes_above varchar(250) NOT NULL, 106 114 mes_open varchar(250) NOT NULL, 107 button_style varchar(250) NOT NULL,115 mes_close varchar(250) NOT NULL, 108 116 PRIMARY KEY (id) 109 117 );"; … … 114 122 $wpdb->insert( 115 123 $table_name, 116 array(117 'clef' => $clef,118 'button' => 'close',119 'mes_above' => 'Click on this button to speak to us directly over the Internet. Make sure that your microphone is activated.',120 'mes_open' => 'Talk to us',121 'button_style' => 'background:white; cursor:hand; border:solid 1px black; font-class:verdana; font-weight:700; color: teal;',122 )124 array( 125 'clef' => $clef, 126 'button' => 'close', 127 'mes_above' => 'Click on this button to speak to us directly over the Internet. Make sure that your microphone is activated.', 128 'mes_open' => 'Talk to us', 129 'mes_close' => 'Sorry, we are not online', 130 ) 123 131 ); 124 132 … … 135 143 if($maclef == '' && $clef == '' ){ 136 144 ?> 137 <p> </p>145 <p> </p> 138 146 <form method='post' action=''> <input type='text' name='clef' value='' placeholder="Your key"/> 139 147 <span class="submit"><input type="submit" class="button-primary" name="submit" value="register" /> … … 165 173 dbDelta( $query ); 166 174 } 167 175 if (isset($_POST['close'])){ 176 global $wpdb; 177 $table_name = $wpdb->prefix . 'uberkeen'; 178 $query="UPDATE $table_name SET button = 'close' " ; 179 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 180 dbDelta( $query ); 181 } 168 182 169 183 … … 172 186 $mes_above = $_POST['mes_above']; 173 187 $mes_open = $_POST['mes_open']; 174 $button_style = $_POST['button_style']; 175 188 $mes_close = $_POST['mes_close']; 176 189 $wpdb->update( 177 $table_name = $wpdb->prefix . 'uberkeen', 178 //$wpdb->prefix .'uberkeen', 190 $wpdb->prefix .'uberkeen', 179 191 array( 180 192 'mes_above' => $mes_above, 181 193 'mes_open' => $mes_open, 182 ' button_style' => $button_style194 'mes_close' => $mes_close 183 195 ), 184 196 array( … … 189 201 190 202 } 203 204 191 205 ?> 192 206 … … 212 226 </form> 213 227 214 <script> 228 <p> </p> 229 <form method='post' action=''> 230 <p>Text above buttons<br /> 231 <textarea name="mes_above" rows="5"><?php echo $mes_above ?></textarea> 232 </p> 233 <p>Text for button<br /> 234 <input name='mes_open' type='text' value="<?php echo $mes_open ?>"/> 235 <span class="submit"><input type="submit" class="button-primary" name="mes" id='mes' value="ok" /></span></p> 236 </form> 237 238 239 <script> 215 240 var myWindow; 216 241 function uberkeen_myFunction() { … … 219 244 220 245 </script> 221 222 223 224 225 <p> </p> 226 <form method='post' action=''> 227 <p> </p> 228 <table width="400" border="0" cellspacing="2" cellpadding="2"> 229 <tr> 230 <td>Text above buttons</td> 231 <td>Text for button</td> 232 <td>Style for button</td> 233 <td> </td> 234 </tr> 235 <tr> 236 <td><textarea name="mes_above" rows="5"><?php echo $mes_above ?></textarea></td> 237 <td><textarea name="mes_open" rows="5" id="mes_open"><?php echo $mes_open ?></textarea></td> 238 <td><textarea name="button_style" rows="5" id="button_style"><?php echo $button_style ?></textarea></td> 239 <td><span class="submit"> 240 <input type="submit" class="button-primary" name="mes" id='mes' value="ok" /> 241 </span></td> 242 </tr> 243 </table> 244 <p><br /> 245 </form> 246 247 248 <p> 249 250 You can use html directly in the text above button and in the dedicaced field for the button itself.</p> 251 <p>Example for text above button: <h1>This is a Blue Heading</h1> <font color='FF00CC'>here</font><br></p> 252 <p>Example for button: background:white; cursor:hand; border:solid 1px black; font-class:verdana; font-weight:700; color: teal; </p> 253 <?php 246 <?php 247 254 248 } 255 249 // fin de page options … … 278 272 } 279 273 add_action('admin_menu', 'uberkeen_options_init'); 280 ?> 281 282 274 ?>
Note: See TracChangeset
for help on using the changeset viewer.