コード例 #1
0
                tep_db_query("update " . TABLE_HEADERS . " set parent_id = '" . (int) $drop_id . "', last_modified = now(), headers_status = '" . (int) $status . "' where headers_id = '" . (int) $headers[$i]['id'] . "'");
            }
        }
        return_content();
        break;
    case 'delete_header_confirm':
        if (isset($_POST['form_type'])) {
            $headers_id = tep_db_prepare_input($_POST['form_type']);
            $headers = tep_get_header_tree($headers_id, '', '0', '', true);
            // removing headers can be a lengthy process
            tep_set_time_limit(0);
            for ($i = 0, $n = sizeof($headers); $i < $n; $i++) {
                tep_remove_header($headers[$i]['id']);
            }
        }
        return_content();
        break;
}
function return_content()
{
    $OSCOM_CategoryTree = new category_tree();
    $OSCOM_StatusTree = new status_tree();
    $return = '<!-- row start -->';
    $return .= '<div class="row">';
    $return .= '<!-- col starts -->';
    $return .= '<div class="col-md-3">';
    $return .= '<!-- panel starts -->';
    $return .= '<div id="storage" class="panel panel-default">';
    $return .= '<div class="panel-heading">';
    $return .= '<h3 class="panel-title">' . TEXT_PLACE_HOLDER . '</h3>';
    $return .= '</div>';
コード例 #2
0
$section->addTitle(htmlspecialchars(return_demographic($_SESSION['pid'], 3)), 1);
$section->addTitle(htmlspecialchars(return_demographic($_SESSION['pid'], 2)), 1);
// Two text break
$section->addTextBreak(2);
$data = array();
for ($i = 1; isset($_POST['select' . $i]); $i++) {
    if (!isset($data[$_POST['box' . $i]])) {
        $data[$_POST['box' . $i]] = array();
    }
    array_push($data[$_POST['box' . $i]], $_POST['select' . $i]);
}
foreach ($data as $box => $array) {
    $section->addTextBreak();
    $section->addText(htmlspecialchars(return_box_name($box)), array("bold" => true, "size" => 14));
    foreach ($array as $line) {
        return_content($line, $section);
    }
}
$section->addTextBreak(2);
function return_box_name($id)
{
    $db = establish_mysql_connection();
    $mysql_query = $db->prepare("SELECT * FROM `boxes` WHERE id={$id}");
    $mysql_query->execute();
    $mysql_array = $mysql_query->fetchAll();
    return $mysql_array[0]['name'];
}
function return_content($id, &$section)
{
    $pid = $_SESSION['pid'];
    $db = establish_mysql_connection();