Ejemplo n.º 1
0
<?php

require_once 'PoeditParser.php';
function buildOptions($args)
{
    $options = array('-o' => null, '-i' => null, '-n' => 'l10n');
    $len = count($args);
    $i = 0;
    while ($i < $len) {
        if (preg_match('#^-[a-z]$#i', $args[$i])) {
            $options[$args[$i]] = isset($args[$i + 1]) ? trim($args[$i + 1]) : true;
            $i += 2;
        } else {
            $options[] = $args[$i];
            $i++;
        }
    }
    return $options;
}
$options = buildOptions($argv);
if (!file_exists($options['-i']) || !is_readable($options['-i'])) {
    die("Invalid input file. Make sure it exists and is readable.");
}
$poeditParser = new PoeditParser($options['-i']);
$poeditParser->parse();
if ($poeditParser->toJSON($options['-o'], $options['-n'])) {
    $strings = count($poeditParser->getStrings());
    echo "Successfully exported " . count($strings) . " strings.\n";
} else {
    echo "Cannor write to file '{$options['-o']}'.\n";
}
Ejemplo n.º 2
0
		}
	}
	?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Spell Checker</title>
<link rel="stylesheet" type="text/css" href="easyspell.css" />
<script src="easyspell.js" type="text/javascript"></script>
</head>
	<?
	if($found_misspell) {
		echo "<body onload=\"document.forms[0].elements['replaceword'].focus();\">\n";
		echo "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">\n";
		echo "<table><tr><td colspan=\"2\"><h3>Not in Dictionary:</h3></td></tr><td class=\"bigcell\"><div id=\"wordbox\">.. {$words[$misspell_index-2]} {$words[$misspell_index-1]} <input type=\"text\" name=\"replaceword\" size=\"".strlen($words[$misspell_index])."\" value=\"$words[$misspell_index]\" /> {$words[$misspell_index+1]} {$words[$misspell_index+2]} ..</div></td><td><input type=\"button\" name=\"ignore\" value=\"Ignore\" onclick=\"ignore_one()\" /><br /><input type=\"button\" name=\"ignoreall\" value=\"Ignore All\" onclick=\"ignore_all()\" /></td></tr>\n";
		echo "<tr><td colspan=\"2\"><h3>Suggestions:</h3></td></tr><tr><td class=\"bigcell\"><select id=\"suggestions\" name=\"suggestions\" multiple=\"1\" size=\"3\" onchange=\"copyWord()\">".buildOptions($suggestions)."</select></td><td><input type=\"button\" name=\"replace\" value=\"Replace\" onclick=\"replace_one()\" /><br /><input type=\"button\" name=\"replaceall\" value=\"Replace All\" onclick=\"replace_all()\" /></td></tr></table>\n";
		echo "<input type=\"hidden\" name=\"fieldtext\" value=\"".str_replace("\"","&quot;",$fieldtext)."\" /><input type=\"hidden\" name=\"start\" value=\"$start\" /><input type=\"hidden\" name=\"errantword\" value=\"$words[$misspell_index]\" /><input type=\"hidden\" name=\"field\" value=\"$formfield\" /><input type=\"hidden\" name=\"formName\" value=\"$formname\"><input type=\"hidden\" name=\"dictadd\" value=\"\" />\n";
		echo "</form>\n";
	}
	else {
		echo "<body><form method=\"get\" class=\"complete\"><h2>Spell checking is complete.</h2><input type=\"button\" name=\"ok\" value=\"OK\" onclick=\"window.close();\" /></form>";
	}
	
}
else {
	if(isset($_REQUEST['field'])) {
		$textfield=$_REQUEST['field'];
		$formname=$_REQUEST['formName'];
		?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Ejemplo n.º 3
0
?>
 autocomplete="off"/>
										<span id="txt_LoginFailed" class="<?php 
echo $_SESSION['errors']['Login'];
?>
">Veuillez entrer un nom utilisateur valide (minimum 4 lettres).</span>
									</td>
									<td>
										<!--Service-->
										<label for="box_Service">Service<span class="red">*</span></label><br />
										<select class="<?php 
echo $lock;
?>
" name="box_Service" id="box_Service" onchange="validate(this.value, this.id);">
											<?php 
buildOptions($serviceOptions, $_SESSION['values']['box_Service'], $readonly);
?>
										</select>
										<span id="box_ServiceFailed" class="<?php 
echo $_SESSION['errors']['Service'];
?>
">
											Veuillez s&eacute;lectionner un service.
										</span>
									</td>
								</tr>
								<tr>
									<td>
										<!--Password-->
										<label for="txt_Password">Mot de passe<span class="red">*</span></label><br />
										<input class="lowercase" type="password" name="txt_Password" id="txt_Password" value="<?php 
Ejemplo n.º 4
0
    }
    // if logger set, use it or use FileLogger by default
    $loggerclass = isset($options['logger']) ? $options['logger'] : "FileLogger";
    $importer->setLogger(new $loggerclass());
    // a chain is a multiple profile run with the following syntax
    // [profilename]:[modename],[profilename]:[modename]
    // if no workflow chain is defined, create a new one
    if (!isset($options["chain"])) {
        $options["chain"] = isset($options["profile"]) ? $options["profile"] : "";
        $options["chain"] .= isset($options["mode"]) ? ":" . $options["mode"] : "";
    }
    // parsing the workflow chain
    $pdefs = explode(",", $options["chain"]);
    // for each import in the workflow
    foreach ($pdefs as $pdef) {
        $pm = explode(":", $pdef);
        $eargv = array();
        // parse workflow definition
        // recreate profile & mode parameters
        if (!empty($pm[0])) {
            $eargv[] = "-profile=" . $pm[0];
        }
        if (isset($pm[1])) {
            $eargv[] = "-mode=" . $pm[1];
        }
        // build options based on profile & mode
        $eoptions = buildOptions($eargv);
        // launch import
        $importer->run(array_merge($eoptions, $options));
    }
}
Ejemplo n.º 5
0
     break;
 case "viewPriv::lst_del_records":
     $sql = "";
     $ids = split(',', $lstParams['req_ids']);
     foreach ($ids as $k => $v) {
         $sql .= "REVOKE ALL PRIVILEGES ON " . $lstParams['view'] . " FROM {$v};\\n";
     }
     print "top.execCommand(\"" . $sql . "\", 'top.elements.viewPriv.output();');";
     break;
 case "viewPrivAdd::edit_get_data":
     $sql = "SELECT null";
     edit_process($db, $lstParams, $sql);
     break;
 case "viewPrivAdd::edit_field_list":
     $sql = "SELECT 'PUBLIC', 'PUBLIC'\n\t\t\t\tUNION ALL\n\t\t\t\t(SELECT usename, usename FROM  pg_user ORDER BY usename)\n\t\t\t\tUNION ALL\n\t\t\t\t(SELECT 'GROUP ' || groname, 'GROUP: ' || groname FROM  pg_group ORDER BY groname)";
     buildOptions($db, $lstParams, $sql);
     break;
 case "viewPrivAdd::edit_save_data":
     $p = $_POST;
     $sql = "REVOKE ALL ON " . $lstParams['view'] . " FROM " . $p['user'] . ";\\n";
     if ($p['select'] == 't') {
         $sql .= "GRANT SELECT ON " . $lstParams['view'] . " TO " . $p['user'] . ";\\n";
     }
     if ($p['insert'] == 't') {
         $sql .= "GRANT INSERT ON " . $lstParams['view'] . " TO " . $p['user'] . ";\\n";
     }
     if ($p['update'] == 't') {
         $sql .= "GRANT UPDATE ON " . $lstParams['view'] . " TO " . $p['user'] . ";\\n";
     }
     if ($p['delete'] == 't') {
         $sql .= "GRANT DELETE ON " . $lstParams['view'] . " TO " . $p['user'] . ";\\n";
Ejemplo n.º 6
0
        // change members
        if ($adduser != '') {
            $sql .= "ALTER GROUP " . $p[user] . " DROP USER {$adduser};\n";
        }
        if ($dropuser != '') {
            $sql .= "ALTER GROUP " . $p[user] . " ADD USER {$dropuser};\n";
        }
        if ($sql != '') {
            print " <textarea id=sql>{$sql}</textarea>\r\t\t\t\t\t<script> \r\t\t\t\t\t\ttop.execCommand(document.getElementById('sql').value, 'top.elements.groupAdd.saveDone()');\r\t\t\t\t\t</script>";
        } else {
            print " <script> top.elements.groupAdd.saveDone();\t</script>";
        }
        break;
    case "vars::lst_get_data":
        // -- server variables
        $sql = "SELECT name, name, setting, \r\t\t\t\t\t" . ($features[set_desc] == 1 ? "replace(short_desc, '\\\\', '') || COALESCE(extra_desc, '')" : "null") . ",\r\t\t\t\t\tcontext, vartype, source, min_val, max_val\r\t\t\t\tFROM  pg_settings\r\t\t\t\tWHERE ~SEARCH~\r\t\t\t\tORDER BY name";
        list_process($db, $lstParams, $sql);
        break;
    case "vars::search_field_list":
        $SQL = "SELECT DISTINCT category, category\r\t\t\t\tFROM pg_settings\r\t\t\t\tORDER BY 1";
        buildOptions($db, $lstParams, $SQL);
        break;
    case "activity::lst_get_data":
        // -- running queries
        $sql = "SELECT procpid, procpid, datname, usename, current_query, current_timestamp - query_start\r\t\t\t\tFROM pg_stat_activity\r\t\t\t\tORDER BY query_start\t\t\r\t\t\t\t";
        list_process($db, $lstParams, $sql);
        break;
    default:
        print "alert('List command is not recognized:  " . $lstParams['req_name'] . "::" . $lstParams['req_cmd'] . "');";
        break;
}
										<label for="chk_status">Compte Actif</label>
										<input class="input" type="checkbox" name="chk_status" id="chk_status" value="1" <?php 
if ($_SESSION['values']['chk_status']) {
    echo 'checked="checked"';
}
?>
 />
									</td>
								</tr>
								<tr>
                                                                        <td>
                                                                                <!--Prefix-->
                                                                                <label for="box_Prefix">Pr&eacute;fix<span class="red">*</span></label><br />
										<select class="input" name="box_Prefix" id="box_Prefix" onchange="validate(this.value, this.id);">
                                                                                	<?php 
buildOptions($prefixOptions, $_SESSION['values']['box_Prefix']);
?>
										</select>
                                                                                <span id="box_PrefixFailed" class="<?php 
echo $_SESSION['errors']['Prefix'];
?>
 red"><br/>
                                                                                        Veuillez s&eacute;lectionner un pr&eacute;fix.
                                                                                </span>

                                                                        </td>
                                                                        <td>
                                                                                <!--RS-->
                                                                                <label for="txt_RS">Raison Sociale<span class="red">*</span></label><br />
                                                                                <input class="uppercase" type="text" name="txt_RS" id="txt_RS" value="<?php 
echo $_SESSION['values']['txt_RS'];
Ejemplo n.º 8
0
         print " <script> top.elements.funAdd.saveDone(); </script>";
     }
     break;
 case "pgexport::edit_get_data":
     $sql = "SELECT null";
     edit_process($db, $lstParams, $sql);
     break;
 case "pgexport::edit_field_list":
     // -- schemas
     if ($lstParams['req_field'] == 'schema') {
         $sql = "SELECT nspname, nspname\n\t\t\t\t\tFROM pg_namespace\n\t\t\t\t\tWHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema'\n\t\t\t\t\tORDER BY nspname";
     }
     if ($lstParams['req_field'] == 'table') {
         $sql = "SELECT relname, relname\n\t\t\t\t\tFROM pg_class\n\t\t\t\t\tWHERE relkind = 'r' AND relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = '" . $lstParams['schema'] . "')\n\t\t\t\t\tORDER BY relname";
     }
     buildOptions($db, $lstParams, $sql, true);
     break;
 case "pgexport::edit_save_data":
     ini_set('memory_limit', '512M');
     set_time_limit(10800);
     // 3 hours
     $p = $_POST;
     $param = '';
     if ($p['schema'] != '') {
         $param .= " -n " . $p['schema'];
     }
     if ($p['table'] != '') {
         $param .= " -t " . $p['table'];
     }
     if ($p['type'] == 's') {
         $param .= " -s";
Ejemplo n.º 9
0
?>
/>
										<div>
										<?php 
if ($svc == "FTR" || $svc == "REG" || $svc == "INF") {
    echo $totalfactures;
}
?>
										</div>
									</td>
									<td>
										<!--Civilite-->
										<label for="box_Civilite">Civilit&eacute;<span class="red">*</span></label><br />
										<select class="input" name="box_Civilite" id="box_Civilite" onchange="validate(this.value, this.id);">
											<?php 
buildOptions($civiliteOptions, $_SESSION['values']['box_Civilite']);
?>
										</select><br/>
										<span id="box_CiviliteFailed" class="<?php 
echo $_SESSION['errors']['Civilite'];
?>
 red">
											Veuillez s&eacute;lectionner une civilit&eacute;.
										</span>
									</td>
								</tr>
								<tr>
									<td>
										<!--Nom Patronimyque-->
										<label for="txt_Nom">Nom<span class="red">*</span></label><br />
										<input class="uppercase" type="text" name="txt_Nom" id="txt_Nom" value="<?php