Plugin Directory

Changeset 1367081


Ignore:
Timestamp:
03/08/2016 09:11:25 PM (10 years ago)
Author:
jeanduez
Message:

corre

Location:
uberkeen/trunk
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • uberkeen/trunk/uberkeen.php

    r1367072 r1367081  
    44Plugin URI: https://uberkeen.com
    55Description: Un plugin de communication live
    6 Version: 1.02
     6Version: 0.1
    77Author: Jean Duez
    88Author URI: https://uberkeen.com
     
    1414
    1515
    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 }
    2116
    2217
     
    3934        $mes_above = $print->mes_above;
    4035        $mes_open = $print->mes_open;
    41         $button_style = $print->button_style;
     36        $mes_close = $print->mes_close;
    4237        }
    4338
    4439        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> &nbsp;&nbsp; <a href='https://www.uberkeen.com'>uberkeen.com</a> gateway &nbsp;&nbsp; </v>";
    4641
    4742        ?>
    4843
    4944
     45<style>
     46.button2 {
     47background: #3e779d;
     48color: #fff;
     49box-shadow:none;
     50margin-bottom: -50%;
     51}
     52v {
     53background: #9CC2DB;
     54color: #777;
     55font-size: 11px;
     56}
     57</style>
    5058       
    5159
     
    5866
    5967        <?php
    60 
     68        ;
    6169}
    6270   
     
    8593    $mes_above = $print->mes_above;
    8694    $mes_open = $print->mes_open;
    87     $button_style = $print->button_style;
     95    $mes_close = $print->mes_close;
    8896    }
    8997
     
    105113                         mes_above varchar(250) NOT NULL,
    106114                         mes_open varchar(250) NOT NULL,
    107                          button_style varchar(250) NOT NULL,
     115                         mes_close varchar(250) NOT NULL,
    108116                         PRIMARY KEY  (id)
    109117                         );";
     
    114122                        $wpdb->insert(
    115123                        $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                        )
    123131                        );
    124132               
     
    135143    if($maclef == '' && $clef == '' ){
    136144        ?> 
    137 <p>&nbsp;</p>
     145         <p>&nbsp;</p>
    138146         <form method='post' action=''> <input type='text' name='clef' value='' placeholder="Your key"/>
    139147         <span class="submit"><input type="submit" class="button-primary" name="submit" value="register" />
     
    165173        dbDelta( $query );
    166174        }
    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        }
    168182
    169183
     
    172186        $mes_above = $_POST['mes_above'];
    173187        $mes_open = $_POST['mes_open'];
    174         $button_style = $_POST['button_style'];
    175 
     188        $mes_close = $_POST['mes_close'];
    176189                $wpdb->update(
    177                     $table_name = $wpdb->prefix . 'uberkeen',
    178                     //$wpdb->prefix .'uberkeen',
     190                    $wpdb->prefix .'uberkeen',
    179191                        array(
    180192                        'mes_above' => $mes_above,
    181193                        'mes_open' => $mes_open,
    182                         'button_style' => $button_style
     194                        'mes_close' => $mes_close
    183195                        ),
    184196                        array(
     
    189201
    190202        }
     203   
     204
    191205?>
    192206   
     
    212226    </form>
    213227
    214         <script>
     228    <p>&nbsp;</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>
    215240        var myWindow;
    216241        function uberkeen_myFunction() {
     
    219244
    220245        </script>
    221        
    222        
    223        
    224 
    225     <p>&nbsp;</p>
    226     <form method='post' action=''>
    227     <p>&nbsp;</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>&nbsp;</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: &lt;h1&gt;This is a Blue Heading&lt;/h1&gt;      &lt;font color='FF00CC'&gt;here&lt;/font&gt;&lt;br&gt;</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
    254248}
    255249// fin de page options
     
    278272}
    279273add_action('admin_menu', 'uberkeen_options_init');
    280 ?>
    281 
    282        
     274?>
Note: See TracChangeset for help on using the changeset viewer.