Ejemplo n.º 1
0
function Configuretwi($subop, $ModPath, $ModStart, $class_sty_2, $npds_twi_arti, $npds_twi_urshort, $npds_twi_post, $consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret, $tbox_width, $tbox_height)
{
    if (file_exists('modules/' . $ModPath . '/twi_conf.php')) {
        include 'modules/' . $ModPath . '/twi_conf.php';
    }
    global $f_meta_nom, $f_titre, $adminimg;
    $checkarti_y = '';
    $checkarti_n = '';
    $checkpost_y = '';
    $checkpost_n = '';
    $urshort_mr = '';
    $urshort_ft = '';
    $urshort_c = '';
    if ($npds_twi_arti === 1) {
        $checkarti_y = 'checked="checked"';
    } else {
        $checkarti_n = 'checked="checked"';
    }
    if ($npds_twi_post === 1) {
        $checkpost_y = 'checked="checked"';
    } else {
        $checkpost_n = 'checked="checked"';
    }
    if ($npds_twi_urshort === 1) {
        $urshort_mr = 'checked="checked"';
    }
    if ($npds_twi_urshort === 2) {
        $urshort_ft = 'checked="checked"';
    }
    if ($npds_twi_urshort === 3) {
        $urshort_c = 'checked="checked"';
    } else {
        $checkpost_n = 'checked="checked"';
    }
    adminhead($f_meta_nom, $f_titre, $adminimg);
    if ($npds_twi != 1) {
        echo '<div class="alert alert-danger">Pour la publication de vos news sur twitter vous devez activer</div>';
    }
    echo '     <span class="text-danger">*</span> ' . twi_trad('requis') . '

   <h3>' . twi_trad('Configuration du module npds_twi') . '</h3>
   <form action="admin.php" method="post">


      <div class="form-group row">
         <label class="form-control-label col-sm-6" for="npds_twi_arti">' . twi_trad('Activation de la publication auto des articles') . '</label>
         <div class="col-sm-6">
            <label><input type="radio" name="npds_twi_arti" value="1" ' . $checkarti_y . ' />&nbsp;' . twi_trad('Oui') . '</label>
            <label><input type="radio" name="npds_twi_arti" value="0" ' . $checkarti_n . ' />&nbsp;' . twi_trad('Non') . '</label>
         </div>
      </div>
    
    
    <!-- En attente implementation 
    <tr>
     <td width="30%">' . twi_trad('Activation de la publication auto des posts') . '</td>
     <td>&nbsp;<input type="radio" name="npds_twi_post" value="1" ' . $checkpost_y . ' />&nbsp;' . twi_trad('Oui') . '&nbsp;&nbsp;<input type="radio" name="npds_twi_post" value="0" ' . $checkpost_n . ' />&nbsp;' . twi_trad('Non') . '</td>
    </tr>
    -->
      <div class="form-group row">
         <label class="form-control-label col-sm-6" for="npds_twi_urshort">' . twi_trad("Méthode pour le raccourciceur d'URL") . '</label>
         <div class="col-sm-6">
            <label><input type="radio" name="npds_twi_urshort" value="1" ' . $urshort_mr . ' />&nbsp;' . twi_trad("Réécriture d'url avec mod_rewrite") . '</label>
            <label><input type="radio" name="npds_twi_urshort" value="2" ' . $urshort_ft . ' />&nbsp;' . twi_trad("Réécriture d'url avec ForceType") . '</label>
            <label><input type="radio" name="npds_twi_urshort" value="3" ' . $urshort_c . ' />&nbsp;' . twi_trad("Réécriture d'url avec controleur Npds") . '</label>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="consumer_key">' . twi_trad('Votre clef de consommateur') . '&nbsp;<span class="text-danger">*</span></label>
         <div class="col-sm-12">
            <input type="text" class="form-control" name="consumer_key" value="' . $consumer_key . '" required="required" />
            <span class="help-block small">' . $consumer_key . '</span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="consumer_secret">' . twi_trad('Votre clef secrète de consommateur') . '&nbsp;<span class="text-danger">*</span></label>
         <div class="col-sm-12">
            <input type="text" class="form-control" name="consumer_secret" value="' . $consumer_secret . '" required="required" />
            <span class="help-block small">' . $consumer_secret . '</span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="oauth_token" >' . twi_trad("Jeton d'accès pour Open Authentification (oauth_token)") . '&nbsp;<span class="text-danger">*</span></label>
         <div class="col-sm-12">
            <input type="text" class="form-control" name="oauth_token" value="' . $oauth_token . '" required="required" />
            <span class="help-block small">' . $oauth_token . '</span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="oauth_token_secret" >' . twi_trad("Jeton d'accès secret pour Open Authentification (oauth_token_secret)") . ' <span class="text-danger">*</span></label>
         <div class="col-sm-12">
            <input type="text" class="form-control" name="oauth_token_secret" value="' . $oauth_token_secret . '" />
            <span class="help-block small">' . $oauth_token_secret . '</span>
         </div>
      </div>
    <!--
    <tr>
    <td colspan="2"><strong>' . twi_trad('Interface bloc') . '</strong></td>
    </tr>
     <td width="30%">
     ' . twi_trad('Largeur de la tweet box') . ' <span class="text-danger">*</span> : ' . $tbox_width . '
     </td>
     <td>
     <input type="text" " size="25" maxlength="3" name="tbox_width" value="' . $tbox_width . '" />
     </td>
    </tr>
    <tr>
     <td width="30%">
     ' . twi_trad('Hauteur de la tweet box') . '</span>  <span class="text-danger">*</span> : ' . $tbox_height . '
     </td>
     <td>
     <input type="text" " size="25" maxlength="3" name="tbox_height" value="' . $tbox_height . '" />
     </td>
    </tr>
    <tr>
    <td colspan="2"><strong>Styles</strong></td>
    </tr>
    <tr>
     <td width="30%">
     <span class="' . $class_sty_2 . '">' . twi_trad('Classe de style titre') . '</span> </td><td><input type="text" size="25" maxlength="255" name="class_sty_1" value="' . $class_sty_1 . '">
     </td>
    </tr>
    <tr>
     <td width="30%">
     <span class="' . $class_sty_2 . '">' . twi_trad("Classe de style sous-titre") . '</span>
     </td>
     <td>
     <input type="text" size="25" maxlength="255" name="class_sty_2" value="' . $class_sty_2 . '" />
     </td>
    </tr>
    -->';
    echo '
      <div class="form-group row">
         <div class="col-sm-12">
            <input class="btn btn-primary" type="submit" value="' . twi_trad('Enregistrez') . '" />
            <input type="hidden" name="op" value="Extend-Admin-SubModule" />
            <input type="hidden" name="ModPath" value="' . $ModPath . '" />
            <input type="hidden" name="ModStart" value="' . $ModStart . '" />
            <input type="hidden" name="subop" value="SaveSettwi" />
         </div>
      </div>
   </form>
   <div class="text-xs-right">Version : ' . $npds_twi_versus . '</div>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 2
0
function Configuretwi($subop, $ModPath, $ModStart, $class_sty_2, $npds_twi_arti, $npds_twi_urshort, $npds_twi_post, $consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret, $tbox_width, $tbox_height)
{
    if (file_exists('modules/' . $ModPath . '/twi_conf.php')) {
        include 'modules/' . $ModPath . '/twi_conf.php';
    }
    $checkarti_y = '';
    $checkarti_n = '';
    $checkpost_y = '';
    $checkpost_n = '';
    $urshort_mr = '';
    $urshort_ft = '';
    $urshort_c = '';
    if ($npds_twi_arti === 1) {
        $checkarti_y = 'checked="checked"';
    } else {
        $checkarti_n = 'checked="checked"';
    }
    if ($npds_twi_post === 1) {
        $checkpost_y = 'checked="checked"';
    } else {
        $checkpost_n = 'checked="checked"';
    }
    if ($npds_twi_urshort === 1) {
        $urshort_mr = 'checked="checked"';
    }
    if ($npds_twi_urshort === 2) {
        $urshort_ft = 'checked="checked"';
    }
    if ($npds_twi_urshort === 3) {
        $urshort_c = 'checked="checked"';
    } else {
        $checkpost_n = 'checked="checked"';
    }
    opentable();
    echo '<form action="admin.php" method="post">
   <table width="100%" cellspacing="2" cellpadding="2" border="1">
   <thead>
    <tr>
    <td class="header" colspan="2">
     <img alt="logo module npds_twi" title="cui cui cui !" src="modules/npds_twi/npds_twi.png" style="float:left;" /><h2>' . twi_trad('Configuration du module npds_twi') . '</h2>
    </td>
    </tr>
   </thead>
   <tfoot>
    <tr>
     <td colspan="2"><span class="rouge">*</span> ' . twi_trad('requis') . '</td>
    </tr>
   </tfoot>
   <tbody>
    <tr>
     <td width="30%">' . twi_trad('Activation de la publication auto des articles') . '</td>
     <td>&nbsp;<input type="radio" name="npds_twi_arti" value="1" ' . $checkarti_y . ' />&nbsp;' . twi_trad('Oui') . '&nbsp;&nbsp;<input type="radio" name="npds_twi_arti" value="0" ' . $checkarti_n . ' />&nbsp;' . twi_trad('Non') . '</td>
    </tr>
    
    <!-- En attente implementation 
    <tr>
     <td width="30%">' . twi_trad('Activation de la publication auto des posts') . '</td>
     <td>&nbsp;<input type="radio" name="npds_twi_post" value="1" ' . $checkpost_y . ' />&nbsp;' . twi_trad('Oui') . '&nbsp;&nbsp;<input type="radio" name="npds_twi_post" value="0" ' . $checkpost_n . ' />&nbsp;' . twi_trad('Non') . '</td>
    </tr>
    -->
    <tr>
     <td width="30%">' . twi_trad('M&#xE9;thode pour le raccourciceur d\'URL') . '</td>
     <td>
     &nbsp;<input type="radio" name="npds_twi_urshort" value="1" ' . $urshort_mr . ' />&nbsp;' . twi_trad('R&#xE9;&#xE9;criture d\'url avec mod_rewrite') . '<br />
     &nbsp;<input type="radio" name="npds_twi_urshort" value="2" ' . $urshort_ft . ' />&nbsp;' . twi_trad('R&#xE9;&#xE9;criture d\'url avec ForceType') . '<br />
     &nbsp;<input type="radio" name="npds_twi_urshort" value="3" ' . $urshort_c . ' />&nbsp;' . twi_trad('R&#xE9;&#xE9;criture d\'url avec contr&#xF4;leur Npds') . '
     </td>
    </tr>

    <tr>
     <td width="30%">
     ' . twi_trad('Votre clef de consommateur') . ' <span class="rouge">*</span> : ' . $consumer_key . '
     </td>
     <td>
      <input type="text" " size="40" name="consumer_key" value="' . $consumer_key . '" />
     </td>
    </tr>
    <tr>
     <td width="30%">
     ' . twi_trad('Votre clef secr&#xE8;te de consommateur') . ' <span class="rouge">*</span> : ' . $consumer_secret . '
     </td>
     <td>
     <input type="text" " size="40" name="consumer_secret" value="' . $consumer_secret . '" />
     </td>
    </tr>
    <tr>
     <td width="30%">
     ' . twi_trad('Jeton d\'acc&#xE8;s pour Open Authentification (oauth_token)') . ' <span class="rouge">*</span> : ' . $oauth_token . '
     </td>
     <td>
     <input type="text" " size="40" name="oauth_token" value="' . $oauth_token . '" />
     </td>
    </tr>
    <tr>
     <td width="30%">
     ' . twi_trad('Jeton d\'acc&#xE8;s secret pour Open Authentification (oauth_token_secret)') . ' <span class="rouge">*</span> : ' . $oauth_token_secret . '
     </td>
     <td>
     <input type="text" " size="40" name="oauth_token_secret" value="' . $oauth_token_secret . '" />
     </td>
    </tr>
    <tr>
    <!--
    <tr>
    <td colspan="2"><strong>' . twi_trad('Interface bloc') . '</strong></td>
    </tr>
     <td width="30%">
     ' . twi_trad('Largeur de la tweet box') . ' <span class="rouge">*</span> : ' . $tbox_width . '
     </td>
     <td>
     <input type="text" " size="25" maxlength="3" name="tbox_width" value="' . $tbox_width . '" />
     </td>
    </tr>
    <tr>
     <td width="30%">
     ' . twi_trad('Hauteur de la tweet box') . '</span>  <span class="rouge">*</span> : ' . $tbox_height . '
     </td>
     <td>
     <input type="text" " size="25" maxlength="3" name="tbox_height" value="' . $tbox_height . '" />
     </td>
    </tr>
    <tr>
    <td colspan="2"><strong>Styles</strong></td>
    </tr>
    <tr>
     <td width="30%">
     <span class="' . $class_sty_2 . '">' . twi_trad('Classe de style titre') . '</span> </td><td><input type="text" size="25" maxlength="255" name="class_sty_1" value="' . $class_sty_1 . '">
     </td>
    </tr>
    <tr>
     <td width="30%">
     <span class="' . $class_sty_2 . '">' . twi_trad("Classe de style sous-titre") . '</span>
     </td>
     <td>
     <input type="text" size="25" maxlength="255" name="class_sty_2" value="' . $class_sty_2 . '" />
     </td>
    </tr>
    -->
    </tbody>
   </table>';
    echo 'Version : ' . $npds_twi_versus . '<br /> <br />
   <input class="bouton_standard" type="submit" value="' . twi_trad('Enregistrez') . '" />
   <input type="hidden" name="op" value="Extend-Admin-SubModule" />
   <input type="hidden" name="ModPath" value="' . $ModPath . '" />
   <input type="hidden" name="ModStart" value="' . $ModStart . '" />
   <input type="hidden" name="subop" value="SaveSettwi" />
   </form>';
    closetable();
}