示例#1
0
><label for="MatchBug">Bug</label><br>
       <input type="checkbox" name="MatchFeature" id="MatchFeature"<?php 
echo matchType($developer->types, "Feature") ? " checked=\"checked\"" : "";
?>
><label for="MatchFeature">Feature</label>
      </td>
      <td style="vertical-align: top">
       <strong>Locale:</strong><br>
<?php 
$locales = db_query("SELECT locale FROM LikeBack GROUP BY locale ORDER BY locale ASC") or die(mysql_error());
while ($line = db_fetch_object($locales)) {
    $locale = htmlentities($line->locale);
    $checked = matchLocale($developer->locales, $locale) ? " checked=\"checked\"" : "";
    echo "       <input type=\"checkbox\" name=\"MatchLocale_{$locale}\" id=\"MatchLocale_{$locale}\"{$checked}><label for=\"MatchLocale_{$locale}\">{$locale}</label><br>\n";
}
$checked = matchLocale($developer->locales, "*") ? " checked=\"checked\"" : "";
?>
       <input type="checkbox" name="MatchOtherLocales" id="MatchOtherLocales"<?php 
echo $checked;
?>
><label for="MatchOtherLocales">Others</label>
      </td>
     </tr>
    </table>
    </div>
    <p style="text-align: center"><input type="submit" name="saveOptions" value="Ok"></p>
   </form>
   <script type="text/javascript">
     document.getElementById("email").focus();
   </script>
  </div>
示例#2
0
<?php

$title = "Comment List";
include "header.php";
require_once "../locales_string.php";
$type = "Like";
$locale = "fr";
$sendMailTo = "";
$data = db_query("SELECT * FROM LikeBackDevelopers WHERE email!=''");
while ($line = db_fetch_object($data)) {
    if (matchType($line->types, $type) && matchLocale($line->locales, $locale)) {
        $sendMailTo .= (empty($sendMailTo) ? "" : "; ") . $line->email;
    }
}
if (isset($_POST['saveOptions'])) {
    $email = addslashes($_POST['email']);
    $types = "";
    if (isset($_POST['MatchLike'])) {
        $types .= (empty($types) ? "" : ";") . "Like";
    }
    if (isset($_POST['MatchDislike'])) {
        $types .= (empty($types) ? "" : ";") . "Dislike";
    }
    if (isset($_POST['MatchBug'])) {
        $types .= (empty($types) ? "" : ";") . "Bug";
    }
    if (isset($_POST['MatchFeature'])) {
        $types .= (empty($types) ? "" : ";") . "Feature";
    }
    $locales = "";
    $localesData = db_query("SELECT locale FROM LikeBack GROUP BY locale ORDER BY locale ASC") or die(mysql_error());