Example #1
0
            echo "<td class=\"data\">";
            echo "<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit_site_plugin_item_types&site_type=" . $site_plugin_r['site_type'] . "\">Item Types</a>";
            echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit_site_plugin_links&site_type=" . $site_plugin_r['site_type'] . "\">Links</a>";
            echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit_site_plugin_confs&site_type=" . $site_plugin_r['site_type'] . "\">Configuration</a>";
            echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit_site_plugin_input_fields&site_type=" . $site_plugin_r['site_type'] . "\">Input Fields</a>";
            echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit_site_plugin_s_attribute_type_maps&site_type=" . $site_plugin_r['site_type'] . "\">Attribute Map</a>";
            echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit_site_plugin_s_attribute_type_lookup_maps&site_type=" . $site_plugin_r['site_type'] . "\">Lookup Attribute Map</a>";
            if (file_exists('./admin/s_site_plugin/sql/' . $site_plugin_r['site_type'] . '.install.class.php')) {
                echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=maintain_site_plugin_install&site_type=" . $site_plugin_r['site_type'] . "\">Install&nbsp;Maintenance</a>";
            }
            echo "</td>";
            echo "<td class=\"data\">";
            echo "<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=sql&site_type=" . $site_plugin_r['site_type'] . "&mode=job\">SQL</a>";
            echo "</td>";
            echo "</tr>";
            $row++;
        }
        db_free_result($results);
        echo "</table>";
        echo "<input type=\"button\" class=\"button\" value=\"Refresh\" onclick=\"document.forms['navigate'].op.value='" . $HTTP_VARS['op'] . "'; document.forms['navigate'].submit();\">" . "<input type=\"button\" class=\"button\" value=\"Update\" onclick=\"this.form.op.value='update_site_plugins'; this.form.submit();\">";
        echo "</form>";
    } else {
        //if($results)
        echo "<p class=\"error\">No Site Plugins Installed</p>";
    }
    function is_not_exists_site_plugin($type)
    {
        return !is_exists_site_plugin($type, FALSE);
    }
    generate_sql_list($ADMIN_TYPE, 'Site Plugin', NULL, 'is_not_exists_site_plugin');
}
Example #2
0
            echo "<div class=\"error\">" . get_opendb_lang_var('operation_not_available') . "</div>";
        }
    } else {
        if ($HTTP_VARS['op'] == '') {
            if (is_not_empty_array($errors)) {
                echo format_error_block($errors);
            }
            // list languages and options
            $results = fetch_language_rs();
            if ($results) {
                echo "<table><tr class=\"navbar\">\n\t\t\t<th>Language</th>\n\t\t\t<th>Description</th>\n\t\t\t<th colspan=2></th>\n\t\t\t</tr>";
                while ($language_r = db_fetch_assoc($results)) {
                    echo "<tr>\n\t\t\t\t<td class=\"data\">" . $language_r['language'] . "</td>\n\t\t\t\t<td class=\"data\">" . $language_r['description'] . "</td>\n\t\t\t\t<td class=\"data\"><a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit-langvars&language={$language_r['language']}\">Language Vars</a>";
                    // there should be no concept of system table lang vars for the default language, as it should
                    // always fall back to the system tables themselves.
                    if (!is_default_language($language_r['language'])) {
                        echo " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=edit-tables&language={$language_r['language']}\">System Table Vars</a>" . " / <a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=delete&language={$language_r['language']}\">Delete</a>";
                    }
                    echo "</td>\n\t\t\t\t<td class=\"data\"><a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=sql&language={$language_r['language']}&mode=job\">SQL</a></td>\n\t\t\t\t</tr>";
                }
                echo "</table>";
                db_free_result($results);
            }
            function is_not_exists_language($language)
            {
                return !is_exists_language($language);
            }
            generate_sql_list($ADMIN_TYPE, 'Language', NULL, 'is_not_exists_language');
        }
    }
}
Example #3
0
    echo "\n</form>";
} else {
    if (strlen($HTTP_VARS['op']) == 0) {
        echo "<p>[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=new\">New Status Type</a>]</p>";
        if (is_not_empty_array($errors)) {
            echo format_error_block($errors);
        }
        $results = fetch_status_type_rs();
        if ($results) {
            echo "\n<form name=\"s_status_type\" action=\"{$PHP_SELF}\" method=\"POST\">";
            echo "\n<input type=\"hidden\" name=\"op\" value=\"\">";
            echo "\n<input type=\"hidden\" name=\"type\" value=\"" . $ADMIN_TYPE . "\">";
            echo "\n<table>";
            echo "<tr class=\"navbar\">" . "<th>Type</th>" . "<th>Description</th>" . "<th>Image</th>" . "<th>Default</th>" . "<th>Closed</th>" . "<th></th>" . "</tr>";
            $row = 0;
            while ($status_type_r = db_fetch_assoc($results)) {
                display_s_status_type_row($status_type_r, $row++);
            }
            db_free_result($results);
            echo "</form>";
            echo "</table>";
        } else {
            echo "<p class=\"error\">No Status Types Installed</p>";
        }
        function is_not_valid_s_status_type($type)
        {
            return !is_valid_s_status_type($type, FALSE);
        }
        generate_sql_list($ADMIN_TYPE, 'Status Type', "/([a-zA-Z]{1})-([^\$]+)\$/", 'is_not_valid_s_status_type');
    }
}
Example #4
0
// There are specific operations where this form should be displayed.
if (strlen($HTTP_VARS['op']) == 0 || $HTTP_VARS['op'] == 'delete_sitem_type_items' && ($HTTP_VARS['confirmed'] == 'false' || $HTTP_VARS['confirmed'] == 'true') || $HTTP_VARS['op'] == 'delete_type_confirm' && ($HTTP_VARS['confirmed'] == 'false' || $HTTP_VARS['confirmed'] == 'true') || $HTTP_VARS['op'] == 'edit_types' || $HTTP_VARS['op'] == 'update_types') {
    echo "<p>[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=new_type\">New Item Type</a>]</p>";
    if (is_not_empty_array($errors)) {
        echo format_error_block($errors);
    }
    $results = fetch_s_item_type_rs();
    if ($results) {
        echo "<form name=\"s_item_type\" action=\"{$PHP_SELF}\" method=\"POST\">" . "<input type=\"hidden\" name=\"type\" value=\"" . $ADMIN_TYPE . "\">" . "<input type=\"hidden\" name=\"op\" value=\"\">" . "<input type=\"hidden\" name=\"s_item_type\" value=\"\">";
        echo "<table>";
        echo "<tr class=\"navbar\">" . "<th>Order</th>" . "<th>Type</th>" . "<th>Description</th>" . "<th colspan=2>Image</th>" . "<th colspan=2></th>" . "</tr>";
        // value, display, img, checked_ind, order_no
        $row = 0;
        while ($item_type_r = db_fetch_assoc($results)) {
            display_s_item_type_row($item_type_r, $row);
            $row++;
        }
        db_free_result($results);
        echo "</table>";
        echo format_help_block('Image(s) must be in a <i>theme search path</i> directory.');
        echo "<input type=\"button\" class=\"button\" value=\"Refresh\" onclick=\"this.form['op'].value='edit_types'; this.form.submit();\">" . " <input type=\"button\" class=\"button\" value=\"Update\" onclick=\"this.form['op'].value='update_types'; this.form.submit();\">";
        echo "</form>";
    } else {
        echo "<p class=\"error\">No Item Types Installed</p>";
    }
    function is_not_exists_item_type($type)
    {
        return !is_exists_item_type($type, FALSE);
    }
    generate_sql_list($ADMIN_TYPE, 'Item Type', NULL, 'is_not_exists_item_type');
}