示例#1
0
    set_js_var('proc_limit', $CONFIG['batch_proc_limit']);
    pageheader($lang_search_new_php['page_title']);
    $help = ' ' . cpg_display_help('f=uploading.htm&as=ftp&ae=ftp_end&top=1#ftp_select_file', '550', '400');
    echo <<<EOT
        <form method="post" action="{$CPG_PHP_SELF}?insert=1" name="selectPics" id="cpgform" style="margin:0px;padding:0px">
EOT;
    echo '<div id="queue">';
    starttable("100%");
    echo <<<EOT
        <tr>
                <td colspan="4" class="tableh1"><h2>{$lang_search_new_php['list_new_pic']}{$help}</h2></td>
        </tr>

EOT;
    $expic_array = array();
    getallpicindb($expic_array, $startdir);
    if (CPGscandir($startdir . DIRECTORY_SEPARATOR, $expic_array)) {
        echo <<<EOT
        <tr>
                <td class="tablef">
                    <input type="checkbox" name="checkAll" onclick="selectAll('cpgform');" class="checkbox" title="{$lang_common['check_uncheck_all']}" />
                </td>
                <td colspan="3" align="right" class="tablef">
                        <button type="submit" class="button" name="insert" id="submit_button_bottom" value="{$lang_search_new_php['insert_selected']}">{$icon_array['ok']}{$lang_search_new_php['insert_selected']}</button>
                </td>
        </tr>

EOT;
    } else {
        echo <<<EOT
        <tr>
示例#2
0
              document.getElementsByName('checkAll')[0].checked = document.getElementsByName('checkAll2')[0].checked;
          }
        }
        -->
        </script>
        <form method="post" action="{$_SERVER['PHP_SELF']}?insert=1" name="selectPics" style="margin:0px;padding:0px">
EOT;
    starttable("100%");
    echo <<<EOT
        <tr>
                <td colspan="3" class="tableh1"><h2>{$lang_search_new_php['list_new_pic']}{$help}</h2></td>
        </tr>

EOT;
    $expic_array = array();
    getallpicindb($expic_array, $_GET['startdir']);
    if (CPGscandir($_GET['startdir'] . '/', $expic_array)) {
        echo <<<EOT
        <tr>
                <td class="tablef">
                    <input type="checkbox" name="checkAll" onClick="selectAll(this,'pics');" class="checkbox" title="{$lang_check_uncheck_all}" />
                </td>
                <td colspan="2" align="center" class="tablef">
                        <input type="submit" class="button" name="insert" value="{$lang_search_new_php['insert_selected']}" />
                </td>
        </tr>

EOT;
    } else {
        echo <<<EOT
        <tr>
    ob_end_flush();
} elseif (isset($HTTP_GET_VARS['startdir'])) {
    pageheader($lang_search_new_php['page_title']);
    starttable("100%");
    echo <<<EOT
        <form method="post" action="{$PHP_SELF}?insert=1" name="selectPics">
        <tr>
                <td colspan="3" class="tableh1"><h2>{$lang_search_new_php['list_new_pic']}</h2></td>
        </tr>

EOT;
    $expic_array = array();
    $check_all = $lang_search_new_php['check_all'];
    $uncheck_all = $lang_search_new_php['uncheck_all'];
    // added below table, JavaScript and additional check/uncheck options: gaugau 03-11-02
    getallpicindb($expic_array, $HTTP_GET_VARS['startdir']);
    if (CPGscandir($HTTP_GET_VARS['startdir'] . '/', $expic_array)) {
        echo <<<EOT
        <tr>
                <td colspan="3" align="center" class="tablef">
                                <script language="javascript" type="text/javascript">
                                <!--
                                function checkAll(field)
                                {
                                for (i = 0; i < field.length; i++)
                                  field[i].checked = true ;
                                }

                                function uncheckAll(field)
                                {
                                for (i = 0; i < field.length; i++)