function countValuesInCommon($array1, $array2)
{
    $count = 0;
    foreach ($array1 as $value) {
        if (isInArray($value, $array2)) {
            $count++;
        }
    }
    return $count;
}
function diff_array($a1, $a2, $main_index1, $main_index2)
{
    $result = array();
    foreach ($a1 as $key => $value) {
        if (!isInArray($a2, $main_index1, $main_index2, $a1[$key][$main_index1], $a1[$key][$main_index2])) {
            $result[] = $a1[$key];
        }
    }
    return $result;
}
Example #3
0
     } else {
         if (isNameError($e)) {
             $isFailed = true;
             $entryLabel = is_dir($entryPath) ? 'thư mục' : 'tập tin';
             $entryCss = is_dir($entryPath) ? 'folder' : 'file';
             echo '<div class="notice_failure">Tên ' . $entryLabel . ' <strong class="' . $entryCss . '_name_rename_action">' . $entry[$k] . '</strong> <strong>=></strong> <strong class="' . $entryCss . '_name_rename_action">' . $e . '</strong> không hợp lệ</div>';
             break;
         } else {
             if (countStringArray($modifier, strtolower($e), true) > 1 && $e != $entry[$k]) {
                 $isFailed = true;
                 $entryLabel = is_dir($entryPath) ? 'thư mục' : 'tập tin';
                 $entryCss = is_dir($entryPath) ? 'folder' : 'file';
                 echo '<div class="notice_failure">Tên ' . $entryLabel . ' <strong class="' . $entryCss . '_name_rename_action">' . $entry[$k] . '</strong> <strong>=></strong> <strong class="' . $entryCss . '_name_rename_action">' . $e . '</strong> này đã tồn tại ở một khung nhập khác</div>';
                 break;
             } else {
                 if (!isInArray($entry, strtolower($e), true) && file_exists($dir . '/' . $e)) {
                     $isFailed = true;
                     $entryLabel = is_dir($entryPath) ? 'thư mục' : 'tập tin';
                     $entryCss = is_dir($entryPath) ? 'folder' : 'file';
                     echo '<div class="notice_failure">Tên ' . $entryLabel . ' <strong class="' . $entryCss . '_name_rename_action">' . $entry[$k] . '</strong> <strong>=></strong> <strong class="' . $entryCss . '_name_rename_action">' . $e . '</strong> này đã tồn tại</div>';
                     break;
                 }
             }
         }
     }
 }
 if (!$isFailed) {
     $isSucceed = true;
     $rand = md5(rand(1000, 99999) . '-' . $dir);
     $rand = substr($rand, 0, strlen($rand) >> 1);
     foreach ($entry as $e) {
Example #4
0
                echo $server;
                ?>
&db=<?php 
                echo $db;
                ?>
"><font color="black" class="heada"><?php 
                echo trim($db);
                ?>
</font></a>
			</div>
			<div ID="el<?php 
                echo $j;
                ?>
Child" CLASS="child">
<?php 
                if (!isInArray($db, $cfgNoTables)) {
                    $sql_get_tbls = "SELECT tablename FROM pg_tables WHERE tablename !~* 'pg_*' ORDER BY tablename";
                    $tbl_res = pg_exec($dbh_tbl, pre_query($sql_get_tbls));
                    $num_tbl = pg_numrows($tbl_res);
                    for ($j = 0; $j < $num_tbl; $j++) {
                        $table = pg_result($tbl_res, $j, "tablename");
                        ?>
<nobr>&nbsp;&nbsp;<a target="main" href="sql.php?sql_query=<?php 
                        echo urlencode("SELECT * FROM {$cfgQuotes}{$table}{$cfgQuotes}");
                        ?>
&server=<?php 
                        echo $server;
                        ?>
&db=<?php 
                        echo urlencode($db);
                        ?>