} } return true; } function err($code, $msg) { echo json_encode(array('error' => array('code' => intval($code), 'msg' => $msg))); exit; } function asBytes($ini_v) { $ini_v = trim($ini_v); $s = array('g' => 1 << 30, 'm' => 1 << 20, 'k' => 1 << 10); return intval($ini_v) * ($s[strtolower(substr($ini_v, -1))] ?: 1); } $MAX_UPLOAD_SIZE = min(asBytes(ini_get('post_max_size')), asBytes(ini_get('upload_max_filesize'))); ?> <!DOCTYPE html> <html><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style> body {font-family: "lucida grande","Segoe UI",Arial, sans-serif; font-size: 14px;width:1024;padding:1em;margin:0;} th {font-weight: normal; color: #1F75CC; background-color: #F0F9FF; padding:.5em 1em .5em .2em; text-align: left;cursor:pointer;user-select: none;} th .indicator {margin-left: 6px } thead {border-top: 1px solid #82CFFA; border-bottom: 1px solid #96C4EA;border-left: 1px solid #E7F2FB; border-right: 1px solid #E7F2FB; } #top {height:52px;} #mkdir {display:inline-block;float:right;padding-top:16px;} label { display:block; font-size:11px; color:#555;}
</p> <p class="alignright"> <input id="layouts-show-log" type="checkbox" name="layouts-show-log" class="hidden" /> <label for="layouts-show-log" id="layouts-show-log-label" class="hidden"><?php _e('Show log', 'ddl-layouts'); ?> </label> <input id="ddl-import" class="button-primary" type="submit" value="<?php _e('Import', 'ddl-layouts'); ?> " name="ddl-import"/> </p> <input type="hidden" value="dll_import_layouts" name="action" /> <input type="hidden" value="<?php echo asBytes(ini_get('upload_max_filesize')); ?> " id="import_max_upload_size"/> <?php wp_nonce_field('layouts-import-nonce', 'layouts-import-nonce'); ?> </form> <div class="import-layouts-messages"></div> </div> </div> </div>