/**
 * Draw folders and files. Changed by Afru
 */
function drawDirs_Files($list, &$manager)
{
    global $relative, $afruViewType, $IMConfig, $insertMode;
    switch ($afruViewType) {
        case 'listview':
            $maxNameLength = 30;
            ?>
            <table class="listview">
            <thead>
            <tr><th colspan="2">Name</th><th>Size</th><th>Image Size</th><th>Date Modified</th><th>&nbsp;</th></tr></thead>
            <tbody>
            <?php 
            // start of foreach for draw listview folders .
            foreach ($list[0] as $path => $dir) {
                ?>
    			<tr>
    			<td><img src="<?php 
                print $IMConfig['base_url'];
                ?>
icons/folder_small.gif" alt="" /></td>
    			<th nowrap><a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&amp;mode=<?php 
                echo $insertMode;
                ?>
&amp;dir=<?php 
                echo rawurlencode($path);
                ?>
&amp;viewtype=<?php 
                echo $afruViewType;
                ?>
" onclick="updateDir('<?php 
                echo $path;
                ?>
')" title="<?php 
                echo $dir['entry'];
                ?>
">
    			<?php 
                if (strlen($dir['entry']) > $maxNameLength) {
                    echo substr($dir['entry'], 0, $maxNameLength) . "...";
                } else {
                    echo $dir['entry'];
                }
                ?>
    			</a></th>
    			<td colspan="2" nowrap>Folder</td>

    			<td nowrap><?php 
                echo date("d.m.y H:i", $dir['stat']['mtime']);
                ?>
</td>

    			<td class="actions" nowrap>
    				<a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&amp;mode=<?php 
                echo $insertMode;
                ?>
&amp;dir=<?php 
                echo $relative;
                ?>
&amp;deld=<?php 
                echo rawurlencode($path);
                ?>
&amp;viewtype=<?php 
                echo $afruViewType;
                ?>
" title="Trash" onclick="return confirmDeleteDir('<?php 
                echo $dir['entry'];
                ?>
', <?php 
                echo $dir['count'];
                ?>
);" style="border:0px;"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a>
    			</td>
    			</tr>
    		  <?php 
            }
            // end of foreach for draw listview folders .
            clearstatcache();
            // start of foreach for draw listview files .
            foreach ($list[1] as $entry => $file) {
                ?>
                <tr>
        		  <td><img src="<?php 
                print $IMConfig['base_url'];
                if (is_file('icons/' . $file['ext'] . '_small.gif')) {
                    echo "icons/" . $file['ext'] . "_small.gif";
                } else {
                    echo $IMConfig['default_listicon'];
                }
                ?>
" alt="" /></td>
                  <th><a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php 
                echo $file['relative'];
                ?>
', '<?php 
                echo preg_replace('#\\..{3,4}$#', '', $entry);
                ?>
', <?php 
                echo $file['image'][0];
                ?>
, <?php 
                echo $file['image'][1];
                ?>
);return false;" title="<?php 
                echo $entry;
                ?>
 - <?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
" <?php 
                if ($insertMode == 'image') {
                    ?>
 onmouseover="showPreview('<?php 
                    echo $file['relative'];
                    ?>
')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" <?php 
                }
                ?>
 >
        			<?php 
                if (strlen($entry) > $maxNameLength) {
                    echo substr($entry, 0, $maxNameLength) . "...";
                } else {
                    echo $entry;
                }
                ?>
                  </a></th>
                  <td><?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
</td>
                  <td><?php 
                if ($file['image'][0] > 0) {
                    echo $file['image'][0] . 'x' . $file['image'][1];
                }
                ?>
</td>
    			  <td nowrap><?php 
                echo date("d.m.y H:i", $file['stat']['mtime']);
                ?>
</td>
                  <td class="actions">
                    <a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&dir=<?php 
                echo $relative;
                ?>
&amp;delf=<?php 
                echo rawurlencode($file['relative']);
                ?>
&amp;mode=<?php 
                echo $insertMode;
                ?>
&amp;viewtype=<?php 
                echo $afruViewType;
                ?>
" title="Trash" onclick="return confirmDeleteFile('<?php 
                echo $entry;
                ?>
');"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a>
        			<?php 
                if ($IMConfig['allow_rename']) {
                    ?>
                    <a href="#" title="Rename" onclick="renameFile('<?php 
                    echo rawurlencode($file['relative']);
                    ?>
'); return false;"><img src="<?php 
                    print $IMConfig['base_url'];
                    ?>
img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a>
                    <?php 
                }
                ?>
        			<?php 
                if ($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0) {
                    ?>
                    <a href="javascript:;" title="Edit" onclick="editImage('<?php 
                    echo rawurlencode($file['relative']);
                    ?>
');"><img src="<?php 
                    print $IMConfig['base_url'];
                    ?>
img/edit_pencil.gif" height="15" width="15" alt="Edit" border="0" /></a>
                    <?php 
                }
                ?>
                  </td>
                </tr>
    		  <?php 
            }
            //end of foreach of draw listview files
            ?>
            </tbody>
            </table>
            <?php 
            break;
        case 'thumbview':
            // thumbview is default
        // thumbview is default
        default:
            $maxFileNameLength = 11;
            $maxFolderNameLength = 13;
            // start of foreach for draw thumbview folders.
            foreach ($list[0] as $path => $dir) {
                ?>
    <div class="dir_holder">
      <a class="dir" href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&amp;mode=<?php 
                echo $insertMode;
                ?>
&amp;dir=<?php 
                echo rawurlencode($path);
                ?>
&amp;viewtype=<?php 
                echo $afruViewType;
                ?>
" onclick="updateDir('<?php 
                echo $path;
                ?>
')" title="<?php 
                echo $dir['entry'];
                ?>
"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/folder.gif" height="80" width="80" alt="<?php 
                echo $dir['entry'];
                ?>
" /></a>

      <div class="edit">
        <a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&amp;mode=<?php 
                echo $insertMode;
                ?>
&amp;dir=<?php 
                echo $relative;
                ?>
&amp;deld=<?php 
                echo rawurlencode($path);
                ?>
&amp;viewtype=<?php 
                echo $afruViewType;
                ?>
" title="Trash" onclick="return confirmDeleteDir('<?php 
                echo $dir['entry'];
                ?>
', <?php 
                echo $dir['count'];
                ?>
);"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_trash.gif" height="15" width="15" alt="Trash" /></a>
    	<?php 
                if (strlen($dir['entry']) > $maxFolderNameLength) {
                    echo substr($dir['entry'], 0, $maxFolderNameLength) . "...";
                } else {
                    echo $dir['entry'];
                }
                ?>
      </div>
    </div>
    		  <?php 
            }
            // end of foreach for draw thumbview folders.
            // start of foreach for draw thumbview files.
            foreach ($list[1] as $entry => $file) {
                $afruimgdimensions = $manager->checkImageSize($file['relative']);
                $thisFileNameLength = $maxFileNameLength;
                ?>
                <div class="thumb_holder" id="holder_<?php 
                echo asc2hex($entry);
                ?>
">
                  <a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php 
                echo $file['relative'];
                ?>
', '<?php 
                echo preg_replace('#\\..{3,4}$#', '', $entry);
                ?>
', <?php 
                echo $file['image'][0];
                ?>
, <?php 
                echo $file['image'][1];
                ?>
);return false;" title="<?php 
                echo $entry;
                ?>
 - <?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
">
                    <img src="<?php 
                print $manager->getThumbnail($file['relative']);
                ?>
" alt="<?php 
                echo $entry;
                ?>
 - <?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
" />
                  </a>
                  <div class="edit">
                    <a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&amp;mode=<?php 
                echo $insertMode;
                ?>
&amp;dir=<?php 
                echo $relative;
                ?>
&amp;delf=<?php 
                echo rawurlencode($file['relative']);
                ?>
&amp;viewtype=<?php 
                echo $afruViewType;
                ?>
" title="Trash" onclick="return confirmDeleteFile('<?php 
                echo $entry;
                ?>
');"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_trash.gif" height="15" width="15" alt="Trash" /></a>
        			<?php 
                if ($IMConfig['allow_rename']) {
                    ?>
                    <a href="#" title="Rename" onclick="renameFile('<?php 
                    echo rawurlencode($file['relative']);
                    ?>
'); return false;"><img src="<?php 
                    print $IMConfig['base_url'];
                    ?>
img/edit_rename.gif" height="15" width="15" alt="Rename" /></a>
                    <?php 
                    $thisFileNameLength -= 3;
                }
                ?>
                	<?php 
                if ($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0) {
                    ?>
                    <a href="javascript:;" title="Edit" onclick="editImage('<?php 
                    echo rawurlencode($file['relative']);
                    ?>
');"><img src="<?php 
                    print $IMConfig['base_url'];
                    ?>
img/edit_pencil.gif" height="15" width="15" alt="Edit" /></a>
            		<?php 
                    $thisFileNameLength -= 3;
                }
                ?>

            		<?php 
                if (strlen($entry) > $thisFileNameLength + 3) {
                    echo strtolower(substr($entry, 0, $thisFileNameLength)) . "...";
                } else {
                    echo $entry;
                }
                ?>
                  </div>
                </div>
    		  <?php 
            }
            //end of foreach of draw thumbview files
    }
}
/**
 * Draw the files in an table.
 */
function drawFiles($list, &$manager)
{
    global $relative;
    global $IMConfig;
    switch ($IMConfig['ViewMode']) {
        case 'details':
            ?>
        <script language="Javascript">
          <!--
            function showPreview(f_url)
            {
              
              window.parent.document.getElementById('f_preview').src = 
                window.parent._backend_url + '__function=thumbs&img=' + f_url;
            }
          //-->
        </script>
        <table class="listview">
        <thead>
        <tr><th>Name</th><th>Filesize</th><th>Dimensions</th></tr></thead>
        <tbody>
          <?php 
            foreach ($list as $entry => $file) {
                ?>
            <tr>
              <th><a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php 
                echo $file['relative'];
                ?>
', '<?php 
                echo $entry;
                ?>
', <?php 
                echo $file['image'][0];
                ?>
, <?php 
                echo $file['image'][1];
                ?>
);return false;" title="<?php 
                echo $entry;
                ?>
 - <?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
" onmouseover="showPreview('<?php 
                echo $file['relative'];
                ?>
')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" ><?php 
                echo $entry;
                ?>
</a></th>
              <td><?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
</td>
              <td><?php 
                if ($file['image']) {
                    echo $file['image'][0] . 'x' . $file['image'][1];
                }
                ?>
              <td class="actions">
                <a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&dir=<?php 
                echo $relative;
                ?>
&amp;delf=<?php 
                echo rawurlencode($file['relative']);
                ?>
" title="Trash" onclick="return confirmDeleteFile('<?php 
                echo $entry;
                ?>
');"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_trash.gif" height="15" width="15" alt="Trash" border="0"  /></a>
        
                <a href="javascript:;" title="Edit" onclick="editImage('<?php 
                echo rawurlencode($file['relative']);
                ?>
');"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_pencil.gif" height="15" width="15" alt="Edit" border="0" /></a>
              </td>
            </tr>
            <?php 
            }
            ?>
        </tbody>
        </table>
        <?php 
            break;
        case 'thumbs':
        default:
            foreach ($list as $entry => $file) {
                ?>
    <div class="thumb_holder" id="holder_<?php 
                echo asc2hex($entry);
                ?>
">
      <a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php 
                echo $file['relative'];
                ?>
', '<?php 
                echo $entry;
                ?>
', <?php 
                echo $file['image'][0];
                ?>
, <?php 
                echo $file['image'][1];
                ?>
);return false;" title="<?php 
                echo $entry;
                ?>
 - <?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
">
        <img src="<?php 
                print $manager->getThumbnail($file['relative']);
                ?>
" alt="<?php 
                echo $entry;
                ?>
 - <?php 
                echo Files::formatSize($file['stat']['size']);
                ?>
"/>
      </a>
      <div class="edit">
        <a href="<?php 
                print $IMConfig['backend_url'];
                ?>
__function=images&dir=<?php 
                echo $relative;
                ?>
&amp;delf=<?php 
                echo rawurlencode($file['relative']);
                ?>
" title="Trash" onclick="return confirmDeleteFile('<?php 
                echo $entry;
                ?>
');"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_trash.gif" height="15" width="15" alt="Trash"  /></a>

        <a href="javascript:;" title="Edit" onclick="editImage('<?php 
                echo rawurlencode($file['relative']);
                ?>
');"><img src="<?php 
                print $IMConfig['base_url'];
                ?>
img/edit_pencil.gif" height="15" width="15" alt="Edit" /></a>

        <?php 
                if ($file['image']) {
                    echo $file['image'][0] . 'x' . $file['image'][1];
                } else {
                    echo $entry;
                }
                ?>
      </div>
    </div>
	  <?php 
            }
    }
}
Beispiel #3
0
function drawFiles($list, &$manager)
{
    global $relative;
    global $IMConfig;
    //$IMConfig['ViewMode'] = 'thumbs';
    switch ($IMConfig['ViewMode']) {
        case 'details':
            ?>
        <script language="Javascript">
          <!--
            function showPreview(f_url)
            {              
              window.parent.document.getElementById('f_preview').src = window.parent._backend_url + '__function=thumbs&img=' + encodeURIComponent(f_url);
            }
          //-->
        </script>
        <table class="listview">
        <thead>
        <tr><th>Title</th><th>Description</th><th>Duration</th></tr></thead>
        <tbody>
          <?php 
            foreach ($list as $record) {
                extract(rip_youtube_data($record));
                ?>
            <tr>
              <th><a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php 
                echo xinha_js_encode($combinedImage);
                ?>
', '<?php 
                echo xinha_js_encode($title);
                ?>
', <?php 
                echo $largest[2];
                ?>
, <?php 
                echo $largest[3];
                ?>
);return false;" title="<?php 
                echo htmlspecialchars($title);
                ?>
 - <?php 
                echo htmlspecialchars($duration);
                ?>
" onmouseover="showPreview('<?php 
                echo xinha_js_encode($combinedImage);
                ?>
')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" ><?php 
                echo htmlspecialchars($title);
                ?>
</a></th>
              <td><?php 
                echo htmlspecialchars($description);
                ?>
</td>
              <td><?php 
                echo htmlspecialchars($duration);
                ?>
              
            </tr>
            <?php 
            }
            ?>
        </tbody>
        </table>
        <?php 
            break;
        case 'thumbs':
        default:
            foreach ($list as $record) {
                extract(rip_youtube_data($record));
                ?>
          <div class="thumb_holder" id="holder_<?php 
                echo asc2hex($combinedImage);
                ?>
">
            <a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php 
                echo xinha_js_encode($combinedImage);
                ?>
', '<?php 
                echo xinha_js_encode($title);
                ?>
', <?php 
                echo $largest[2];
                ?>
, <?php 
                echo $largest[3];
                ?>
);return false;" title="<?php 
                echo htmlspecialchars($title);
                ?>
 - <?php 
                echo htmlspecialchars($duration);
                ?>
">
              <img src="<?php 
                print $thumbImage;
                ?>
" alt="<?php 
                echo $title;
                ?>
 - <?php 
                echo htmlspecialchars($duration);
                ?>
"/>
            </a>
          </div>
          <?php 
            }
    }
}
Beispiel #4
0
function f3($v97)
{
    global $v67;
    if ($v67 == "win") {
        return asc2hex($v97);
    } else {
        return rawurlencode($v97);
    }
}
Beispiel #5
0
     $hash2 = genSalt('zxcv', 6, 1);
 }
 $cryptform .= "</textarea><br>\n   <select name=\"cryptmethod\"> \n   <option value=\"asc2hex\"" . ($_POST["cryptmethod"] == "asc2hex" ? " selected" : "") . ">ASCII to Hex</option> \n   <option value=\"hex2asc\"" . ($_POST["cryptmethod"] == "hex2asc" ? " selected" : "") . ">Hex to ASCII</option> \n   <option value=\"b64enc\"" . ($_POST["cryptmethod"] == "b64enc" ? " selected" : "") . ">Base64 Encode</option> \n   <option value=\"b64dec\"" . ($_POST["cryptmethod"] == "b64dec" ? " selected" : "") . ">Base64 Decode</option> \n   <option value=\"crypt\"" . ($_POST["cryptmethod"] == "crypt" ? " selected" : "") . ">DES</option> \n   <option value=\"entityenc\"" . ($_POST["cryptmethod"] == "entityenc" ? " selected" : "") . ">HTML Entities Encode</option> \n   <option value=\"entitydec\"" . ($_POST["cryptmethod"] == "entitydec" ? " selected" : "") . ">HTML Entities Decode</option> \n   <option value=\"md5\"" . ($_POST["cryptmethod"] == "md5" ? " selected" : "") . ">MD5</option>\n   <option value=\"md5md5\"" . ($_POST["cryptmethod"] == "md5md5" ? " selected" : "") . ">MD5(MD5)</option>\n   <option value=\"md5unix\"" . ($_POST["cryptmethod"] == "md5unix" ? " selected" : "") . ">MD5(Unix - \$1\$)</option>\n   <option value=\"md5wp\"" . ($_POST["cryptmethod"] == "md5wp" ? " selected" : "") . ">MD5(WordPress - \$P\$B)</option>\n   <option value=\"md5bb\"" . ($_POST["cryptmethod"] == "md5bb" ? " selected" : "") . ">MD5(PHPBB3 - \$H\$9)</option>\n   <option value=\"md5apr\"" . ($_POST["cryptmethod"] == "md5apr" ? " selected" : "") . ">MD5(APR1 - \$apr1\$)</option>\n   <option value=\"blowfish\"" . ($_POST["cryptmethod"] == "blowfish" ? " selected" : "") . ">Blowfish - \$2a\$</option>\n   <option value=\"sha1\"" . ($_POST["cryptmethod"] == "sha1" ? " selected" : "") . ">SHA1</option>\n   <option value=\"sha256\"" . ($_POST["cryptmethod"] == "sha256" ? " selected" : "") . ">SHA256 - \$5\$</option>\n   <option value=\"sha512\"" . ($_POST["cryptmethod"] == "sha512" ? " selected" : "") . ">SHA512 - \$6\$</option>\n   <option value=\"mysql4\"" . ($_POST["cryptmethod"] == "mysql4" ? " selected" : "") . ">MySQL4</option>\n   <option value=\"mysql5\"" . ($_POST["cryptmethod"] == "mysql5" ? " selected" : "") . ">MySQL5</option>\n   </select> salt: <input type=\"text\" name=\"hash\" size=\"9\" maxlength=\"8\" value=\"" . $hash . "\"> <input type=\"text\" name=\"hash1\" size=\"9\" maxlength=\"8\" value=\"" . $hash1 . "\"> <input type=\"text\" name=\"hash2\" size=\"7\" maxlength=\"6\" value=\"" . $hash2 . "\"> <font color=\"gray\">(salt needed for: md5(unix,wordpress,phpbb3,apr1) - 8 symbols, sha(256,512) - 16 symbols, and blowfish - 22 symbols. ignore these fields if you use other algorithms)</font><br>\n   <input type=\"submit\" name=\"crypt\" value=\"go\"> \n   </form>";
 echo $cryptform;
 if (isset($_POST['crypt'])) {
     $text = $_POST['text'];
     if ($text == '') {
         die("<p>empty form</p>\n" . $pageend . "");
     }
     $hash = $_POST['hash'];
     $hash1 = $_POST['hash1'];
     $hash2 = $_POST['hash2'];
     echo "--><br><textarea cols=\"80\" rows=\"4\">";
     switch ($_POST['cryptmethod']) {
         case "asc2hex":
             $text = asc2hex($text);
             break;
         case "hex2asc":
             $text = hex2asc($text);
             break;
         case 'b64enc':
             $text = base64_encode($text);
             break;
         case 'b64dec':
             $text = base64_decode($text);
             break;
         case 'crypt':
             $text = crypt($text, 'CRYPT_STD_DES');
             break;
         case 'entityenc':
             $text = entityenc($text);
Beispiel #6
0
function f4($v105)
{
    global $v77;
    if ($v77 == "win") {
        $v84 = asc2hex($v105);
    } else {
        $v84 = rawurlencode($v105);
    }
    return $v84;
}
Beispiel #7
0
function cleanForFlash($theString)
{
    //global $osType;
    $retval = $theString;
    //if($osType == "win"){
    $retval = asc2hex($retval);
    //$retval = str_replace("&", "%26", $retval);
    //$retval = str_replace("%", "%25", $retval);
    //} else {
    //$retval = rawurlencode($theString);
    //}
    //$retval = cleanForXML($theString);
    return $retval;
}