Ejemplo n.º 1
0
function subscribe($var)
{
    if ($var != "") {
        include "header.php";
        opentable();
        echo "<form action=\"lnl.php\" method=\"POST\">";
        echo translate("Manage your subscribes") . " : <b>" . $var . "</b><br /><br />";
        echo Q_spambot() . "<br /><br />";
        echo "<input type=\"hidden\" name=\"email\" value=\"{$var}\" />";
        echo "<input type=\"hidden\" name=\"op\" value=\"subscribeOK\" />";
        echo "<input type=\"submit\" class=\"bouton_standard\" value=\"" . translate("Submit") . "\" />&nbsp;&nbsp;&nbsp;&nbsp;";
        echo "<a href=\"index.php\" class=\"noir\">" . translate("Go Back") . "</a></form>\n";
        closetable();
        include "footer.php";
    } else {
        header("location: index.php");
    }
}
Ejemplo n.º 2
0
function preview_review($title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $hits, $id)
{
    global $admin, $short_review;
    $title = stripslashes(strip_tags($title));
    $text = stripslashes(removeHack(conv2br($text)));
    $reviewer = stripslashes(strip_tags($reviewer));
    $url_title = stripslashes(strip_tags($url_title));
    include 'header.php';
    echo '
   <h2>' . translate("Write a Review") . '</h2>
   <form method="post" action="reviews.php">';
    if ($title == '') {
        $error = 1;
        echo '<div class="alert alert-danger">' . translate("Invalid Title... can not be blank") . '</div>';
    }
    if ($text == '') {
        $error = 1;
        echo '<div class="alert alert-danger">' . translate("Invalid review text... can not be blank") . '</div>';
    }
    if ($score < 1 || $score > 10) {
        $error = 1;
        echo '<div class="alert alert-danger">' . translate("Invalid score... must be between 1 and 10") . '</div>';
    }
    if ($hits < 0 && $id != 0) {
        $error = 1;
        echo '<div class="alert alert-danger">' . translate("Hits must be a positive integer") . '</div>';
    }
    if ($reviewer == '' || $email == '') {
        $error = 1;
        echo '<div class="alert alert-danger">' . translate("You must enter both your name and your email") . '</div>';
    } else {
        if ($reviewer != "" && $email != "") {
            if (!preg_match('#^[_\\.0-9a-z-]+@[0-9a-z-\\.]+\\.+[a-z]{2,4}$#i', $email)) {
                $error = 1;
                echo '<div class="alert alert-danger">' . translate("Invalid email (eg: you@hotmail.com)") . '</div>';
            }
        }
    }
    if ($url_title != '' && $url == '' || $url_title == "" && $url != "" and !$short_reviews) {
        $error = 1;
        echo '<div class="alert alert-danger">' . translate("You must enter BOTH a link title and a related link or leave both blank") . '</div>';
    } else {
        if ($url != "" && !preg_match('#^http(s)?://#i', $url)) {
            $error = 1;
            echo '<div class="alert alert-danger">' . translate("Product Official Website. Make sure your URL starts by") . ' http(s)://</div>';
        }
    }
    if ($error == 1) {
        echo '<button class="btn btn-secondary" type="button" onclick="history.go(-1)"><i class="fa fa-lg fa-undo"></i></button>';
    } else {
        global $gmt;
        $fdate = date(str_replace("%", "", translate("linksdatestring")), time() + $gmt * 3600);
        echo '' . translate("Waiting Reviews") . '';
        echo '
      <br />' . translate("Added:") . ' ' . $fdate . '
      <hr noshade="noshade" />
      <span>' . $title . '</span><br />';
        if ($cover != '') {
            echo "<img src=\"images/reviews/{$cover}\" align=\"right\" hspace=\"10\" vspace=\"10\">";
        }
        echo $text;
        echo '<hr noshade="noshade" />';
        echo "<strong>" . translate("Reviewer") . " :</strong> <a href=\"mailto:{$email}\" target=\"_blank\">{$reviewer}</a><br />";
        echo '<strong>' . translate("Score:") . '</strong>
      <div class="text-success">' . display_score($score) . '</div> <br />';
        if ($url != '') {
            echo "<br /><b>" . translate("Related Link") . " :</b> <a href=\"{$url}\" target=\"_blank\">{$url_title}</a>";
        }
        if ($id != 0) {
            echo "<br /><b>" . translate("Review ID") . " :</b> {$id}<br />";
            echo "<b>" . translate("Hits") . " :</b> {$hits}<br />";
        }
        $text = urlencode($text);
        echo '
            <input type="hidden" name="id" value="' . $id . '" />
            <input type="hidden" name="hits" value="' . $hits . '" />
            <input type="hidden" name="date" value="' . $fdate . '" />
            <input type="hidden" name="title" value="' . $title . '" />
            <input type="hidden" name="text" value="' . $text . '" />
            <input type="hidden" name="reviewer" value="' . $reviewer . '" />
            <input type="hidden" name="email" value="' . $email . '" />
            <input type="hidden" name="score" value="' . $score . '" />
            <input type="hidden" name="url" value="' . $url . '" />
            <input type="hidden" name="url_title" value="' . $url_title . '" />
            <input type="hidden" name="cover" value="' . $cover . '" />
            <input type="hidden" name="op" value="add_reviews" />
            <br />' . translate("Does this look right?") . '&nbsp;&nbsp;';
        if (!$admin) {
            echo Q_spambot();
        }
        echo '
      <input class="btn btn-primary" type="submit" value="' . translate("Yes") . '" />&nbsp;
      <input class="btn btn-secondary" type="button" onclick="history.go(-1)" value="' . translate("No") . '" />';
        if ($id != 0) {
            $word = translate("modified");
        } else {
            $word = translate("added");
        }
        if ($admin) {
            echo "<br /><b>" . translate("Note:") . "</b> " . translate("Currently logged in as admin... this review will be") . " {$word} " . translate("immediately") . ".";
        }
    }
    echo '</form>';
    include "footer.php";
}
Ejemplo n.º 3
0
function AddLink()
{
    global $ModPath, $ModStart, $links_DB, $NPDS_Prefix, $links_anonaddlinklock;
    include "header.php";
    $mainlink = 'ad_l';
    global $user;
    mainheader();
    if (autorisation($links_anonaddlinklock)) {
        echo '
   <div class="card card-block">
      <h3>Proposer un lien</h3>
      <ul>
         <li>' . translate("Submit a unique link only once.") . '</li>
         <li>' . translate("All links are posted pending verification.") . '</li>
         <li>' . translate("Username and IP are recorded, so please don't abuse the system.") . '</li>
      </ul>
      <form class="" method="post" action="modules.php" name="adminForm">
         <input type="hidden" name="ModPath" value="' . $ModPath . '" />
         <input type="hidden" name="ModStart" value="' . $ModStart . '" />
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="title">' . translate("Title") . '</label>
            <div class="col-sm-9">
               <input class="form-control" type="text" id="title" name="title" maxlength="100" required="required" />
           </div>
        </div>';
        global $links_url;
        if ($links_url or $links_url == -1) {
            echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="url">URL</label>
            <div class="col-sm-9">
               <input class="form-control" type="url" id="url" name="url" maxlength="100" value="http://" required="required" />
           </div>
        </div>';
        }
        $result = sql_query("SELECT cid, title FROM " . $links_DB . "links_categories ORDER BY title");
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="cat">' . translate("Category") . '</label>
            <div class="col-sm-9">
               <select class="c-select form-control" name="cat">';
        while (list($cid, $title) = sql_fetch_row($result)) {
            echo '
                  <option value="' . $cid . '">' . aff_langue($title) . '</option>';
            $result2 = sql_query("select sid, title from " . $links_DB . "links_subcategories WHERE cid='{$cid}' ORDER BY title");
            while (list($sid, $stitle) = sql_fetch_row($result2)) {
                echo '
                  <option value="' . $cid . '-' . $sid . '">' . aff_langue($title . '/' . $stitle) . '</option>';
            }
        }
        echo '
              </select>
           </div>
        </div>';
        global $links_topic;
        if ($links_topic) {
            echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="topicL">' . translate("Topics") . '</label>
            <div class="col-sm-9">
               <select class="c-select form-control" name="topicL">';
            $toplist = sql_query("SELECT topicid, topictext FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
            echo '
                  <option value="">' . translate("All Topics") . '</option>';
            while (list($topicid, $topics) = sql_fetch_row($toplist)) {
                echo '
                  <option value="' . $topicid . '">' . $topics . '</option>';
            }
            echo '
               </select>
            </div>
         </div>';
        }
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-12" for="xtext">' . translate("Description") . '</label>
            <div class="col-sm-12">
               <textarea class="tin form-control" name="xtext" rows="10"></textarea>
            </div>
         </div>';
        echo aff_editeur('xtext', '');
        global $cookie;
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="name">' . translate("Your Name") . '</label>
            <div class="col-sm-9">
               <input type="text" class="form-control" id="name" name="name" maxlength="60" value="' . $cookie[1] . '" required="required" />
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="email">' . translate("Your Email") . '</label>
            <div class="col-sm-9">
               <input type="email" class="form-control" id="email" name="email" maxlength="60" required="required" />
            </div>
         </div>';
        echo Q_spambot();
        echo '
         <div class="form-group row">
            <input type="hidden" name="op" value="Add" />
            <div class="col-sm-12">
               <input type="submit" class="btn btn-primary" value="' . translate("Add URL") . '" />
            </div>
         </div>
      </form>';
    } else {
        echo '
        <p align="center>' . translate("You are not a registered user or you have not logged in.") . '<br />
        ' . translate("If you were registered you could add links on this website.") . '</p>';
    }
    echo '
   </div>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 4
0
               list($attachsig) = sql_fetch_row($asig);
               if ($attachsig == 1 or isset($sig)) {
                   $s = 'checked="checked"';
               } else {
                   $s = '';
               }
               echo '
    <div class="checkbox">
       <label class="">
          <input type="checkbox" name="sig" ' . $s . ' /> ' . translate("Show signature") . ' :<br /><small>' . translate("This can be altered or added in your profile") . '</small>
       </label>
    </div>';
           }
       }
       echo '</div></div>';
       echo '' . Q_spambot() . '';
       echo '
 <input type="hidden" name="ModPath" value="comments" />
 <input type="hidden" name="ModStart" value="reply" />
 <input type="hidden" name="topic" value="' . $topic . '" />
 <input type="hidden" name="file_name" value="' . $file_name . '" />
 <input type="hidden" name="archive" value="' . $archive . '" />';
       echo '
    <!--<div class="form-group text-xs-center">
    <div class="col-sm-offset-2 col-sm-10">-->
       <div class="btn-group-sm text-xs-center">
    <br />
    <input class="btn btn-primary" type="submit" name="submitS" value="' . translate("Submit") . '" />
    <input class="btn btn-default" type="submit" name="submitP" value="' . translate("Preview") . '" />
    <input class="btn btn-warning" type="reset" value="' . translate("Clear") . '" />
    <input class="btn btn-danger" type="submit" name="cancel" value="' . translate("Cancel Post") . '" />
Ejemplo n.º 5
0
<?php

/************************************************************************/
/* SFORM Extender for Dune comments - Review                            */
/* ===========================                                          */
/*                                                                      */
/* P. Brunier 2002 - 2015                                               */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Champ Combo : hauteur = 5
$tmp = array("a1" => array('en' => "1", 'selected' => false), "a2" => array('en' => "2", 'selected' => false), "a3" => array('en' => "3", 'selected' => false), "a4" => array('en' => "4", 'selected' => false), "a5" => array('en' => "5", 'selected' => false), "a6" => array('en' => "6", 'selected' => false), "a7" => array('en' => "7", 'selected' => true), "a8" => array('en' => "8", 'selected' => false), "a9" => array('en' => "9", 'selected' => false), "a10" => array('en' => "10", 'selected' => false));
$m->add_select('score', translate("Score:"), $tmp, false, 5, false);
// CE CHAMPS est indispensable --- Don't remove this field
// Champ text : Longueur = 800 / TextArea / Obligatoire / Pas de Vérification
$m->add_field('message', translate("Comment"), '', 'textarea', true, 800, 10, '', '');
// ------------------------------------------------------------------------------
// Champs nécessaires au fonctionnement du formulaire / Don't remove these fields
$m->add_title(translate("Score"));
$m->add_field('ModStart', '', $ModStart, 'hidden', false);
$m->add_field('ModPath', '', $ModPath, 'hidden', false);
$m->add_field('topic', '', $topic, 'hidden', false);
$m->add_field('file_name', '', $file_name, 'hidden', false);
// Submit bouton and anti-spam
$m->add_extra('<tr><td align="center" colspan="2"><br />');
$m->add_extra_hidden(Q_spambot() . "&nbsp;&nbsp;");
$m->add_field('SubmitS', "", translate("Submit"), 'submit', false);
$m->add_extra('</td></tr>');
// ------------------------------------------------------------------------------
Ejemplo n.º 6
0
                if ($upload == "on") {
                    $up = "checked=\"checked\"";
                }
                echo '	 
			<div class="form-group">
			            <div class="row">			
               <label class="control-label col-sm-4 col-md-4" for="aid">' . translate("Upload file after send accepted") . ' :</label>
               <div class="col-sm-1 col-md-1">
                  <input class="form-control" type="checkbox" name="html" ' . $up . ' />
               </div>
			   </div>
            </div>
		 ';
            }
        }
        echo "" . Q_spambot() . "";
        echo '	
			<fieldset>
			<div class="btn-group-sm text-xs-center" role="group">
				<input type="hidden" name="forum" value="' . $forum . '" />
				<input type="hidden" name="topic" value="' . $topic . '" />				
				<input class="btn btn-primary" type="submit" name="submitS" value="' . translate("Submit") . '" accesskey="s" />
				<input class="btn btn-default" type="submit" name="submitP" value="' . translate("Preview") . '" />
				<input class="btn btn-warning" type="reset" value="' . translate("Clear") . '" />
				<input class="btn btn-danger" type="submit" name="cancel" value="' . translate("Cancel Post") . '" />			
			</div>
			</fieldset>			
			';
    } else {
        echo '' . translate("You are not allowed to reply in this forum") . '';
    }
Ejemplo n.º 7
0
function RecommendSite()
{
    global $user;
    if ($user) {
        global $cookie, $NPDS_Prefix;
        $result = sql_query("SELECT name, email FROM " . $NPDS_Prefix . "users WHERE uname='{$cookie['1']}'");
        list($yn, $ye) = sql_fetch_row($result);
    } else {
        $yn = '';
        $ye = '';
    }
    include "header.php";
    echo '
   <div class="card card-block">
   <h2>' . translate("Recommend this Site to a Friend") . '</h2>
   <hr />
   <form action="friend.php" method="post">
      <input type="hidden" name="op" value="SendSite" />
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="yname">' . translate("Your Name") . '</label>
         <div class="col-sm-8">
            <input type="text" class="form-control" id="yname" name="yname" value="' . $yn . '" required="required" maxlength="100" />
            <span class="help-block text-xs-right"><span class="muted" id="countcar_yname"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="ymail">' . translate("Your Email") . '</label>
         <div class="col-sm-8">
            <input type="email" class="form-control" id="ymail" name="ymail" value="' . $ye . '" required="required" maxlength="100" />
            <span class="help-block text-xs-right"><span class="muted" id="countcar_ymail"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="fname">' . translate("Friend Name") . '</label>
         <div class="col-sm-8">
            <input type="text" class="form-control" id="fname" name="fname" required="required" maxlength="100" />
            <span class="help-block text-xs-right"><span class="muted" id="countcar_fname"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="fmail">' . translate("Friend Email") . '</label>
         <div class="col-sm-8">
            <input type="email" class="form-control" id="fmail" name="fmail" required="required" maxlength="100" />
            <span class="help-block text-xs-right"><span class="muted" id="countcar_fmail"></span></span>
         </div>
      </div>
      ' . Q_spambot() . '
      <div class="form-group row">
         <div class="col-sm-8 offset-sm-4">
            <button type="submit" class="btn btn-primary"><i class="fa fa-lg fa-at"></i>&nbsp;' . translate("Send") . '</button>
         </div>
      </div>
   </form>
   <script type="text/javascript">
   //<![CDATA[
   $(document).ready(function() {
      inpandfieldlen("yname",100);
      inpandfieldlen("ymail",100);
      inpandfieldlen("fname",100);
      inpandfieldlen("fmail",100);
      });
   //]]>
   </script>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 8
0
              if ($upload == 'on') {
                  $up = 'checked="checked"';
              }
              echo '
          <div class="checkbox">
             <label class="custom-control custom-checkbox">
                <input class="custom-control-input" type="checkbox" name="upload" ' . $up . ' />
                <span class="custom-control-indicator"></span>
                <span class="custom-control-description">' . translate("Upload file after send accepted") . '</span>
             </label>
          </div>';
          }
      }
      echo '
       </div>
    </div>' . Q_spambot() . '
    <div class="form-group row">
       <div class="col-sm-12">
          <input type="hidden" name="forum" value="' . $forum . '" />
          <input type="hidden" name="topic" value="' . $topic . '" />
          <input type="hidden" name="post" value="' . $post . '" />
          <button class="btn btn-primary" type="submit" name="submitS" value="' . translate("Submit") . '" accesskey="s" />' . translate("Submit") . '</button>&nbsp;
          <button class="btn btn-danger" type="submit" value="' . translate("Cancel Post") . '" name="cancel" title="' . translate("Cancel Post") . '" data-toggle="tooltip" ><i class="fa fa-close fa-lg"></i>' . translate("Cancel Post") . '</button>
       </div>
    </div>';
  } else {
      echo '
    <div class="alert alert-danger">' . translate("You are not allowed to reply in this forum") . '</div>';
  }
  echo '
 </form>';
Ejemplo n.º 9
0
function PreviewStory($name, $subject, $story, $bodytext, $topic, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur)
{
    global $tipath, $NPDS_Prefix, $topictext, $topicimage;
    $topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
    include 'header.php';
    $subject = stripslashes(str_replace('"', '&quot;', strip_tags($subject)));
    $story = stripslashes($story);
    $bodytext = stripslashes($bodytext);
    echo '
   <h2>' . translate("Submit News") . '</h2>
   <form class="" action="submit.php" method="post" name="adminForm">
      <p class="lead"><strong>' . translate("Your Name") . '</strong> : ' . $name . '</p>
      <input type="hidden" name="name" value="' . $name . '" />';
    echo '<div class="card card-block">';
    if ($topic == '') {
        //      $topicimage='all-topics.gif';
        $warning = '<strong class="text-danger">' . translate("Select Topic") . '</strong>';
    } else {
        $warning = '';
        $result = sql_query("SELECT topictext, topicimage FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
        list($topictext, $topicimage) = sql_fetch_row($result);
    }
    if ($topicimage !== '') {
        if (!($imgtmp = theme_image('topics/' . $topicimage))) {
            $imgtmp = $tipath . $topicimage;
        }
        $timage = $imgtmp;
        if (file_exists($imgtmp)) {
            $topiclogo = '<img class="img-fluid N_sujetsize" src="' . $timage . '" align="right" alt="" />';
        }
    }
    $storyX = aff_code($story);
    $bodytextX = aff_code($bodytext);
    themepreview('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . $storyX . '</div>', $bodytextX);
    //    if ($no_img) {
    //       echo '<strong>'.aff_langue($topictext).'</strong>';
    //    }
    echo '
   </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="subject">' . translate("Title") . '</label>
         <div class="col-sm-9">
            <input type="text" name="subject" class="form-control" value="' . $subject . '" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="topic">' . translate("Topic") . '</label>
         <div class="col-sm-9">
            <select class="c-select form-control" name="topic">';
    $toplist = sql_query("SELECT topicid, topictext FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
    echo '
               <option value="">' . translate("Select Topic") . '</option>';
    while (list($topicid, $topics) = sql_fetch_row($toplist)) {
        if ($topicid == $topic) {
            $sel = 'selected="selected" ';
        }
        echo '
               <option ' . $sel . ' value="' . $topicid . '">' . aff_langue($topics) . '</option>';
        $sel = '';
    }
    echo '
            </select>
            <span class="help-block text-danger">' . $warning . '</span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="story">' . translate("Intro Text") . '</label>
         <div class="col-sm-12">
            <span class="help-block">' . translate("HTML is fine, but double check those URLs and HTML tags!") . '</span>
            <textarea class="tin form-control" rows="25" name="story">' . $story . '</textarea>';
    echo aff_editeur('story', '');
    echo '</div>
      </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-12">' . translate("Full Text") . '</label>
            <div class="col-sm-12">
               <textarea class="tin form-control" rows="25" name="bodytext">' . $bodytext . '</textarea>';
    echo aff_editeur('bodytext', '');
    echo '
            </div>
         </div>';
    publication($deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur);
    echo '' . Q_spambot() . '';
    echo '
         <div class="form-group">
            <div class="col-sm-12">
               <input class="btn btn-secondary" type="submit" name="op" value="' . translate("Preview") . '" />
            </div>
      </div>';
    echo '
      <div class="form-group">
         <div class="col-sm-12">
            <input class="btn btn-primary" type="submit" name="op" value="Ok" />
         </div>
      </div>
   </form>';
    include 'footer.php';
}
Ejemplo n.º 10
0
             if ($attachsig == 1 || $sig == "on") {
                 $s = "checked=\"checked\"";
             }
             if ($forum_type != "6" and $forum_type != "5") {
                 echo "<input type=\"checkbox\" name=\"sig\" {$s} />" . translate("Show signature") . " <span style=\"font-size: 10px;\">(" . translate("This can be altered or added in your profile") . ")</span><br />";
             }
         }
         if ($allow_upload_forum) {
             if ($upload == "on") {
                 $up = "checked=\"checked\"";
             }
             echo "<input type=\"checkbox\" name=\"upload\" {$up} />" . translate("Upload file after send accepted") . "<br />";
         }
     }
     echo "</td></tr><tr>";
     echo "<td class=\"ligna\" align=\"center\">" . Q_spambot() . "</td>";
     echo "<td class=\"ligna\" align=\"center\">";
     echo "<input type=\"hidden\" name=\"forum\" value=\"{$forum}\" />";
     echo "<input type=\"hidden\" name=\"topic\" value=\"{$topic}\" />";
     echo "<input type=\"hidden\" name=\"post\" value=\"{$post}\" />";
     echo "<br /><input class=\"bouton_standard\" type=\"submit\" name=\"submitS\" value=\"" . translate("Submit") . "\" accesskey=\"s\" />&nbsp;";
     echo "&nbsp;<input class=\"bouton_standard\" type=\"submit\" name=\"submitP\" value=\"" . translate("Preview") . "\" />&nbsp;";
     echo "&nbsp;<input class=\"bouton_standard\" type=\"reset\" value=\"" . translate("Clear") . "\" />&nbsp;";
     echo "&nbsp;<input class=\"bouton_standard\" type=\"submit\" name=\"cancel\" value=\"" . translate("Cancel Post") . "\" /><br /><br />";
     echo "</td></tr>";
 } else {
     echo "<tr>";
     echo "<td class=\"ligna\" colspan=\"2\" align=\"center\">" . translate("You are not allowed to reply in this forum") . "</td>";
     echo "</tr>";
 }
 echo "</table></form>";
Ejemplo n.º 11
0
function ViewImg($galid, $pos, $interface)
{
    global $NPDS_Prefix, $ModPath, $ThisFile, $user, $vote_anon, $comm_anon, $post_anon, $aff_vote, $aff_comm, $admin;
    settype($galid, "integer");
    settype($pos, "integer");
    if ($admin) {
        $no_aff = "";
    } else {
        $no_aff = "and noaff='0'";
    }
    $gal = sql_fetch_row(sql_query("SELECT acces FROM " . $NPDS_Prefix . "tdgal_gal WHERE id='" . $galid . "'"));
    if (autorisation($gal[0])) {
        $num = sql_num_rows(sql_query("SELECT id FROM " . $NPDS_Prefix . "tdgal_img WHERE gal_id='" . $galid . "' {$no_aff}"));
        if ($interface != "no") {
            $row = sql_fetch_row(sql_query("SELECT * FROM " . $NPDS_Prefix . "tdgal_img WHERE gal_id='" . $galid . "' {$no_aff} ORDER BY ordre,id LIMIT {$pos},1"));
        } else {
            $row = sql_fetch_row(sql_query("SELECT * FROM " . $NPDS_Prefix . "tdgal_img WHERE id='" . $pos . "' and gal_id='" . $galid . "' {$no_aff}"));
        }
        list($width, $height, $type, $attr) = @getimagesize("modules/{$ModPath}/imgs/{$row['2']}");
        echo '<div class="col-md-12"><img class="center-block img-fluid" src="modules/' . $ModPath . '/imgs/' . $row[2] . '" alt="' . stripslashes($row[3]) . '" border="0" ' . $attr . ' /><br />' . stripslashes($row[3]) . '</div>';
        if ($interface != "no") {
            echo '<a class="btn" href="' . $ThisFile . '&amp;op=diapo&galid=' . $galid . '&pos=' . $pos . '&pid=' . $row[0] . '">';
            echo '<i class="fa fa-sliders fa-lg"></i></a>';
            if (isset($user) || $post_anon) {
                $link_card = '<a class="btn" href="' . $ThisFile . '&amp;op=ecard&galid=' . $galid . '&pos=' . $pos . '&pid=' . $row[0] . '">';
                $link_card .= '<i class="fa fa-envelope-o fa-lg"></i></a>';
            } else {
                $link_card .= '<i class="fa fa-envelope-o fa-lg"></i>';
            }
            echo $link_card;
            if ($pos > 0) {
                $link_prec = "<a class=\"btn\" href=\"" . $ThisFile . "&amp;op=img&galid={$galid}&pos=" . ($pos - 1) . "\">";
                $link_prec .= '<i class="fa fa-chevron-left fa-lg"></i></a>';
            }
            echo $link_prec;
            if ($pos < $num - 1) {
                $link_suiv = "<a class=\"btn\" href=\"" . $ThisFile . "&amp;op=img&galid={$galid}&pos=" . ($pos + 1) . "\">";
                $link_suiv .= '<i class="fa fa-chevron-right fa-lg"></i></a>';
            }
            echo $link_suiv;
        }
        $update = sql_query("UPDATE " . $NPDS_Prefix . "tdgal_img SET view = view + 1 WHERE id='" . $row[0] . "'");
        echo '<hr />';
        if ($interface != "no") {
            if ($aff_vote) {
                // Notation de l'image
                if (isset($user) || $vote_anon) {
                    echo '<h4>' . gal_trans("Noter cette image") . '</h4>';
                    echo '<div class="row">';
                    $i = 0;
                    $star = '';
                    while ($i <= 5) {
                        $star .= '<i class="fa fa-star-o fa-lg"></i>';
                        echo '<div class="col-md-2"><a href="' . $ThisFile . '&amp;op=vote&amp;value=' . $i . '&amp;pic_id=' . $row[0] . '&amp;gal_id=' . $galid . '&amp;pos=' . $pos . '">';
                        //                  echo '<img src="modules/'.$ModPath.'/data/'.$i.'.gif" alt="'.$i.'" />';
                        echo $star . '
                  </a></div>';
                        $i++;
                    }
                    echo '</div>';
                }
            }
        }
        // Infos sur l'image
        echo '<hr />';
        $tailleo = @filesize("modules/{$ModPath}/imgs/{$row['2']}");
        $taille = $tailleo / 1000;
        echo '
   <h4>' . gal_trans("Informations sur l'image") . '</h4>
   <ul class="list-group">
      <li class="list-group-item">' . gal_trans("Taille du fichier") . '<span class="label label-default pull-xs-right">' . $taille . ' Ko</span></li>
      <li class="list-group-item">' . gal_trans("Dimensions") . '<span class="label label-default pull-xs-right">' . $width . ' x ' . $height . ' Pixels</span></li>';
        if ($aff_vote) {
            $rowV = sql_fetch_row(sql_query("SELECT COUNT(id), AVG(rating) FROM " . $NPDS_Prefix . "tdgal_vot WHERE pic_id='" . $row[0] . "'"));
            $note = round($rowV[1]);
            $star = '';
            $i = 0;
            while ($i <= $note) {
                $star .= '<i class="fa fa-star fa-lg"></i> ';
                $i++;
            }
            echo '<li class="list-group-item">' . gal_trans("Note ") . $rowV[0] . ' ' . gal_trans("vote(s)") . '<span class="label label-default pull-xs-right">' . $star . '</span></li>';
        }
        echo '<li class="list-group-item">' . gal_trans("Affichées") . '<span class="label label-default pull-xs-right">' . ($row[4] + 1) . ' ' . gal_trans("fois") . '</span></li>';
        echo '</ul>';
        echo "<br />";
        if ($interface != "no") {
            if ($aff_comm) {
                // Commentaires sur l'image
                $qcomment = sql_query("SELECT * FROM " . $NPDS_Prefix . "tdgal_com WHERE pic_id='" . $row[0] . "' ORDER BY comtimestamp DESC LIMIT 0,10");
                $num_comm = sql_num_rows($qcomment);
                if ($num_comm > 0 || (isset($user) || $comm_anon)) {
                    echo '<table class="table" border ="0">';
                    while ($rowC = sql_fetch_row($qcomment)) {
                        echo "<thead><tr class=\"table-active\"><th>" . $rowC[2] . "</th><th class=\"text-xs-right\">" . date(translate("dateinternal"), $rowC[5]) . "</th></tr></thead>";
                        echo "<tbody><tr><td colspan=\"2\">" . stripslashes($rowC[3]) . "</td></tr>";
                        echo "<tr><td colspan=\"2\"> </td></tr>";
                    }
                    echo "</tbody></table>";
                    // Formulaire de post de commentaire
                    if (isset($user) || $comm_anon) {
                        echo '<div class="col-md-12">';
                        echo "<form action=\"" . $ThisFile . "\" method=\"post\" name=\"PostComment\">";
                        echo "";
                        echo "<input type=\"hidden\" name=\"op\" value=\"postcomment\">";
                        echo "<input type=\"hidden\" name=\"gal_id\" value=\"{$galid}\">";
                        echo "<input type=\"hidden\" name=\"pos\" value=\"{$pos}\">";
                        echo "<input type=\"hidden\" name=\"pic_id\" value=\"" . $row[0] . "\">";
                        echo '<fieldset class="form-group">
                        <label><strong>' . gal_trans("Ajoutez votre commentaire") . '</strong></label>
                        <textarea class="form-control tin" id="com" name="comm" rows="5"></textarea>
                        </fieldset>';
                        echo aff_editeur("comm", "false");
                        //anti_spambot - begin
                        echo Q_spambot() . "  ";
                        //anti_spambot - end
                        echo "<input class=\"btn btn-primary\" type=\"submit\" value=\"OK\">";
                        echo "</form></div>";
                    }
                }
            }
        }
    }
}
Ejemplo n.º 12
0
 function print_form($bg)
 {
     if (isset($this->form_id)) {
         $id_form = "id=\"" . $this->form_id . "\"";
     } else {
         $id_form = "";
     }
     $str = "";
     if ($this->form_method != "") {
         $str .= "<form class=\"\" action=\"" . $this->url . "\" " . $id_form . "  method=\"" . $this->form_method . "\" name=\"" . $this->form_title . "\" enctype=\"multipart/form-data\"";
         if ($this->form_check == "true") {
             $str .= "onsubmit='return check();'>\n";
         } else {
             $str .= ">\n";
         }
     }
     // todo utilisation de tabindex dans les input
     $str .= "<fieldset id=\"" . $this->form_title . "\">\n           <legend>" . $this->title . "</legend>\n";
     for ($i = 0; $i < count($this->form_fields); $i++) {
         if (array_key_exists('size', $this->form_fields[$i])) {
             if ($this->form_fields[$i]['size'] >= $this->field_size) {
                 $csize = $this->field_size;
             } else {
                 $csize = $this->form_fields[$i]['size'] + 1;
             }
         }
         if (array_key_exists('name', $this->form_fields[$i])) {
             $num_extender = $this->interro_fields($this->form_fields[$i]['name'] . "extender");
         } else {
             $num_extender = "no";
         }
         if (array_key_exists('type', $this->form_fields[$i])) {
             switch ($this->form_fields[$i]['type']) {
                 case 'text':
                     $str .= '
      <div class="form-group row">
         <div class="col-sm-4">';
                     $str .= "<label class=\"form-control-label\" for=\"" . $this->form_fields[$i]['name'] . "\">" . $this->form_fields[$i]['en'];
                     $this->form_fields[$i]['value'] = str_replace('\'', '&#039;', $this->form_fields[$i]['value']);
                     if ($this->form_fields[$i]['obligation']) {
                         $this->form_check .= " && (f.elements['" . $this->form_fields[$i]['name'] . "'].value!='')";
                         $str .= "&nbsp;<span class=\"text-danger\">*</span></label></div>\n";
                     } else {
                         $str .= "&nbsp;</label></div>\n";
                     }
                     // Charge la valeur et analyse la clef
                     if ($this->form_fields[$i]['name'] == $this->form_key) {
                         $this->form_key_value = $this->form_fields[$i]['value'];
                         if ($this->form_key_status == "close") {
                             $str .= "<div class=\"col-sm-8\">\n";
                             $str .= "<input class=\"form-control\" readonly type=\"" . $this->form_fields[$i]['type'] . "\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\"";
                         } else {
                             $str .= "<div class=\"col-sm-8\">\n";
                             $str .= "<input class=\"form-control\" type=\"" . $this->form_fields[$i]['type'] . "\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\"";
                         }
                     } else {
                         $str .= "<div class=\"col-sm-8\">\n";
                         $str .= "<input class=\"form-control\" type=\"" . $this->form_fields[$i]['type'] . "\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\"";
                     }
                     if ($num_extender != "no") {
                         $str .= " " . $this->form_fields[$num_extender]['javas'] . ">";
                         $str .= $this->form_fields[$num_extender]['html'];
                     } else {
                         $str .= " /> ";
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'password-access':
                     $this->form_fields[$i]['value'] = $this->form_password_access;
                 case 'password':
                     $str .= '
       <div class="form-group row">
          <div class="col-sm-4">';
                     $str .= "<label class=\"form-control-label\" for=\"" . $this->form_fields[$i]['name'] . "\">" . $this->form_fields[$i]['en'];
                     $this->form_fields[$i]['value'] = str_replace('\'', '&#039;', $this->form_fields[$i]['value']);
                     if ($this->form_fields[$i]['obligation']) {
                         $this->form_check .= " && (f.elements['" . $this->form_fields[$i]['name'] . "'].value!='')";
                         $str .= "&nbsp;<span class=\"text-danger\">*</span></label></div>\n";
                     } else {
                         $str .= "</label></div>\n";
                     }
                     $str .= "<div class=\"col-sm-8\">\n";
                     $str .= "<input class=\"form-control\" type=\"" . $this->form_fields[$i]['type'] . "\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\" />";
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'checkbox':
                     $str .= '
       <div class="checkbox row">
          <div class="col-sm-4">';
                     $str .= "<label class=\"form-control-label\" for=\"" . $this->form_fields[$i]['name'] . "\">" . $this->form_fields[$i]['en'];
                     $str .= $this->form_fields[$i]['obligation'] ? "&nbsp;<span class=\"text-danger\">*</span></label>\n" : "</label></div>\n";
                     $str .= "<div class=\"col-sm-8\">\n";
                     $str .= "<input class=\"form-control\" type=\"checkbox\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'] . "\"";
                     $str .= " value=\"" . $this->form_fields[$i]['value'] . "\"";
                     $str .= $this->form_fields[$i]['checked'] ? " checked=\"checked\" />" : " />";
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'textarea':
                 case 'textarea_no_mceEditor':
                     $str .= '
       <div class="form-group row">
          <div class="col-sm-4">';
                     $str .= "<label class=\"form-control-label\" for=\"" . $this->form_fields[$i]['name'] . "\">" . $this->form_fields[$i]['en'] . "\n";
                     $this->form_fields[$i]['value'] = str_replace('\'', '&#039;', $this->form_fields[$i]['value']);
                     if ($this->form_fields[$i]['obligation']) {
                         $this->form_check .= " && (f.elements['" . $this->form_fields[$i]['name'] . "'].value!='')";
                         $str .= "&nbsp;<span class=\"text-danger\">*</span>";
                     }
                     $str .= '</label></div>';
                     $txt_row = $this->form_fields[$i]['diviseur'];
                     $txt_col = ($this->form_fields[$i]['size'] - $this->form_fields[$i]['size'] % $txt_row) / $txt_row;
                     $str .= "<div class=\"col-sm-8\"><textarea class=\"form-control\" name=\"" . $this->form_fields[$i]['name'] . "\"";
                     if ($this->form_fields[$i]['type'] == "textarea_no_mceEditor") {
                         $str .= "class=\"textbox_no_mceEditor\"";
                     }
                     $str .= "cols=\"{$txt_col}\" rows=\"{$txt_row}\">" . $this->form_fields[$i]['value'] . "</textarea>";
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'show-hidden':
                     $str .= $this->form_fields[$i]['en'] . "<br />";
                     if ($num_extender != "no") {
                         $str .= "" . $this->form_fields[$num_extender]['html'];
                     }
                     $str .= "\n";
                 case 'hidden':
                     $this->form_fields[$i]['value'] = str_replace('\'', '&#039;', $this->form_fields[$i]['value']);
                     $str .= "<input type=\"hidden\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" />\n";
                     break;
                 case 'select':
                     $str .= '
       <div class="form-group row">
          <div class="col-sm-4">
             <label class="form-control-label" for="' . $this->form_fields[$i]['name'] . '">
             ' . $this->form_fields[$i]['en'] . '
             </label>
          </div>
          <div class="col-sm-8">';
                     $str .= "<select class=\"c-select form-control\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'];
                     $str .= $this->form_fields[$i]['multiple'] ? "[]\" multiple" : "\"";
                     if ($num_extender != "no") {
                         $str .= " " . $this->form_fields[$num_extender]['javas'] . " ";
                     }
                     $str .= $this->form_fields[$i]['size'] > 1 ? " size=\"" . $this->form_fields[$i]['size'] . "\">" : ">";
                     while (list($key, $val) = each($this->form_fields[$i]['value'])) {
                         $str .= "<option value=\"" . $key . "\"";
                         $str .= $val['selected'] ? " selected=\"selected\">" : ">";
                         $str .= str_replace('\'', '&#039;', $val['en']) . "</option>";
                     }
                     $str .= '</select>';
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'radio':
                     $first_radio = true;
                     $str .= '
       <div class="form-group row">
          <div class="col-sm-4">
            <label class="form-control-label" for="' . $this->form_fields[$i]['name'] . '">' . $this->form_fields[$i]['en'] . '</label>
         </div>';
                     while (list($key, $val) = each($this->form_fields[$i]['value'])) {
                         $str .= '
         <div class="col-sm-8">
            <input class="form-control" type="radio" ';
                         if ($first_radio) {
                             $str .= "id=\"" . $this->form_fields[$i]['name'] . "\" ";
                             $first_radio = false;
                         }
                         $str .= "name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $key . "\"";
                         $str .= $val['checked'] ? " checked=\"checked\" />" : " />&nbsp;";
                         $str .= $val['en'] . "&nbsp;&nbsp;";
                     }
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'comment':
                     $str .= "<div class=\"col-sm-12\"><p>";
                     $str .= $this->form_fields[$i]['en'];
                     $str .= "</p></div>\n";
                     break;
                 case 'Qspam':
                     $str .= Q_spambot();
                     $str .= "\n";
                     break;
                 case 'extra':
                 case 'extra-hidden':
                     $str .= $this->form_fields[$i]['en'];
                     break;
                 case 'submit':
                     $this->form_fields[$i]['value'] = str_replace('\'', '&#039;', $this->form_fields[$i]['value']);
                     $str .= '
      <div class="form-group">
         <div class="col-sm-12 btn-block">
            <button class="btn btn-primary" id="' . $this->form_fields[$i]['name'] . '" type="submit" name="' . $this->form_fields[$i]['name'] . '"><i class="fa fa-check fa-lg"></i> ' . $this->form_fields[$i]['value'] . ' </button>
         </div>
      </div>';
                     break;
                 case 'reset':
                     $this->form_fields[$i]['value'] = str_replace('\'', '&#039;', $this->form_fields[$i]['value']);
                     $str .= $this->form_fields[$i]['en'];
                     $str .= "<div class=\"form-group\">";
                     $str .= "<div class=\"col-sm-12 btn-block\"><input class=\"btn btn-warning\" id=\"" . $this->form_fields[$i]['name'] . "\" type=\"reset\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" /></div></div>\n";
                     break;
                 case 'stamp':
                     if ($this->form_fields[$i]['value'] == "") {
                         $this->form_fields[$i]['value'] = strtotime("now");
                     }
                     if ($this->form_fields[$i]['name'] == $this->form_key) {
                         $this->form_key_value = $this->form_fields[$i]['value'];
                     }
                     $str .= "<input type=\"hidden\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" />";
                     break;
                 case 'date':
                     if ($this->form_fields[$i]['value'] == "") {
                         $this->form_fields[$i]['value'] = date($this->form_fields[$i]['model']);
                     }
                     $str .= '
       <div class="form-group row">
          <div class="col-sm-4">';
                     $str .= "<label class=\"form-control-label\" for=\"" . $this->form_fields[$i]['name'] . "\">" . $this->form_fields[$i]['en'];
                     if ($this->form_fields[$i]['obligation']) {
                         $this->form_check .= " && (f.elements['" . $this->form_fields[$i]['name'] . "'].value!='')";
                         $str .= "&nbsp;<span class=\"text-danger\">*</span></label></div>";
                     } else {
                         $str .= "</label></div>";
                     }
                     if ($this->form_fields[$i]['name'] == $this->form_key) {
                         $this->form_key_value = $this->form_fields[$i]['value'];
                         if ($this->form_key_status == "close") {
                             $str .= "<input type=\"hidden\" id=\"" . $this->form_fields[$i]['name'] . "\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" />";
                             $str .= "<b>" . $this->form_fields[$i]['value'] . "</b>";
                         } else {
                             $str .= "<div class=\"col-sm-8\">\n";
                             $str .= "<input class=\"form-control\" id=\"" . $this->form_fields[$i]['name'] . "\" type=\"text\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\" />";
                         }
                     } else {
                         $str .= "<div class=\"col-sm-8\">\n";
                         $str .= "<input class=\"form-control\" id=\"" . $this->form_fields[$i]['name'] . "\" type=\"text\" name=\"" . $this->form_fields[$i]['name'] . "\" value=\"" . $this->form_fields[$i]['value'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\" />";
                     }
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 case 'upload':
                     $str .= '
      <div class="form-group row">
         <div class="col-sm-4">';
                     $str .= "<label class=\"form-control-label\" for=\"" . $this->form_fields[$i]['name'] . "\">" . $this->form_fields[$i]['en'] . "</label></div>\n";
                     $str .= "<input class=\"form-control\" id=\"" . $this->form_fields[$i]['name'] . "\" type=\"file\" name=\"" . $this->form_fields[$i]['name'] . "\" size=\"" . $csize . "\" maxlength=\"" . $this->form_fields[$i]['size'] . "\" />";
                     $str .= "<div class=\"col-sm-8\">\n";
                     $str .= "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"" . $this->form_fields[$i]['file_size'] . "\" />";
                     if ($num_extender != "no") {
                         $str .= $this->form_fields[$num_extender]['html'];
                     }
                     $str .= '
         </div>
      </div>';
                     break;
                 default:
                     break;
             }
         }
     }
     $str .= "</fieldset>\n";
     if ($this->form_method != "") {
         $str .= "</form>\n";
     }
     if ($this->form_check != "false") {
         $str .= "<script type=\"text/javascript\">//<![CDATA[" . CRLF;
         $str .= "var f=document.forms['" . $this->form_title . "'];" . CRLF;
         $str .= "function check(){" . CRLF;
         $str .= " if(" . $this->form_check . "){" . CRLF;
         $str .= "   f.submit();" . CRLF;
         $str .= "   return true;" . CRLF;
         $str .= " } else {" . CRLF;
         $str .= "   alert('" . $this->mess . "');" . CRLF;
         $str .= "   return false;" . CRLF;
         $str .= "}}" . CRLF;
         $str .= "//]]></script>\n";
     }
     return $str;
 }