public function process($slug = NULL)
 {
     if (!$slug) {
         show_404();
     }
     $form = $this->fuel->forms->get($slug);
     $return_url = $this->input->get_post('return_url') ? $this->input->get_post('return_url') : $form->get_return_url();
     $form_url = $this->input->get_post('form_url');
     if ($form and $form->process()) {
         if (is_ajax()) {
             // Set a 200 (okay) response code.
             set_status_header('200');
             echo $form->after_submit_text;
             exit;
         } else {
             $this->session->set_flashdata('success', TRUE);
             redirect($return_url);
         }
     } else {
         $this->session->set_flashdata('posted', $this->input->post());
         if (is_ajax()) {
             // Set a 500 (bad) response code.
             set_status_header('500');
             echo display_errors(NULL, '');
             exit;
         } else {
             if (!empty($form_url) && $form_url != $return_url) {
                 $return_url = $form_url;
                 // update to post back to the correct page when there's an error
             }
             $this->session->set_flashdata('error', $form->errors());
             redirect($return_url);
         }
     }
 }
Beispiel #2
0
function assign_jobs()
{
    global $smarty;
    global $db;
    $db->run('get_jobs_customer(' . $_SESSION['customer_id'] . ')');
    if ($db->error_result) {
        display_error(1);
        return true;
    }
    $jobs = $db->get_result_array();
    if (empty($jobs)) {
        $smarty->assign('job_message', 'Im Moment sind keine Aufträge vorhanden.');
        return true;
    }
    $db->run('get_job_status_customer(' . $_SESSION['customer_id'] . ')');
    if ($db->error_result) {
        display_errors(1);
        return true;
    }
    $job_status = $db->get_result_array();
    foreach ($jobs as $j_key => $job) {
        foreach ($job_status as $js_key => $status) {
            if ($job['job_id'] == $status['job_id']) {
                $jobs[$j_key]['status'][] = $status;
            }
        }
    }
    $smarty->assign('jobs', $jobs);
    return true;
}
Beispiel #3
0
function parse_messages()
{
    if (isset($_GET['success']) && $_GET['success']) {
        display_success($_GET['success'], true);
    }
    if (isset($_GET['errors']) && $_GET['errors']) {
        display_errors(explode($_GET['errors']));
    }
}
    function test_display_errors_one()
    {
        new_flash('Something went wrong', 1);

        $result = display_errors(true);

        $this->assertEquals(preg_match('/Something went wrong/', $result), 1);
        $this->assertEquals($_SESSION['flash'], array());

    }
Beispiel #5
0
function valid_request($required_vars)
{
    global $smarty;
    foreach ($required_vars as $val) {
        if (!$val) {
            display_errors(2);
            return false;
        }
    }
    return true;
}
Beispiel #6
0
function parse_messages()
{
    if (isset($_SESSION['success'])) {
        display_success($_SESSION['success'], true);
        unset($_SESSION['success']);
    }
    if (isset($_SESSION['errors'])) {
        display_errors($_SESSION['errors']);
        unset($_SESSION['errors']);
    }
}
Beispiel #7
0
function complete_add_email()
{
    if (valid_request(array(isset($_POST['title']), isset($_POST['email']), isset($_POST['text'])))) {
        global $smarty;
        if (!mail('*****@*****.**', "Interface Mail: " . $_POST['title'], $_SESSION['last_name'] . ", " . $_SESSION['first_name'] . " (" . $_SESSION['customer_id'] . ") schreibt: \r\n\r\n" . $_POST['text'], "From: " . $_POST['email'] . "\r\nReply-To: " . $_POST['email'] . "")) {
            display_errors(50);
            return true;
        }
        redirect('jobs', '', 'add_email');
    }
    return true;
}
Beispiel #8
0
function display_info($type, $info, $debug = 0)
{
    switch ($type) {
        case "1":
            if (!empty($info)) {
                $txt_to_print .= display_errors($info);
            }
            break;
        case "2":
            $txt_to_print = $debug == 1 ? sprintf("-- %'-85s\n", $info) : "";
            break;
        case "3":
            $txt_to_print = "\n" . $info;
            break;
        case "4":
            $txt_to_print = $debug == 1 ? "\n" . $info : "";
            break;
    }
    return $txt_to_print;
}
Beispiel #9
0
function call_and_assign($sql, $var_name, $array = false, $alert_when_empty = false)
{
    global $smarty;
    global $db;
    //echo $sql."<br />";
    $db->run($sql);
    if ($db->error_result) {
        display_errors(1);
        return true;
    }
    if ($alert_when_empty && $db->empty_result) {
        display_errors(3);
        return true;
    }
    if ($array) {
        $smarty->assign($var_name, $db->get_result_array());
    } else {
        $smarty->assign($var_name, $db->get_result_row());
    }
    return true;
}
 public function cadastrar_image_doct()
 {
     $user_name = $this->session->userdata('username');
     $dataAtualizacao = date('y-m-d h:i:s');
     $row_id = $this->input->post('row_id');
     $file_to_upload = $this->input->post('file_send');
     // 'upload_path'     => dirname($_SERVER["SCRIPT_FILENAME"])."/files/",
     //           'upload_url'      => base_url()."files/",
     $config['upload_path'] = dirname($_SERVER["SCRIPT_FILENAME"]) . "/imagens_doct";
     $config['upload_url'] = base_url() . "/imagens_doct";
     $config['allowed_types'] = 'gif|jpg|png';
     $config['max_size'] = '100000';
     $config['encrypt_name'] = true;
     $this->upload->initialize($config);
     $this->load->library('upload', $this->config);
     if ($this->upload->do_upload('file_send')) {
         echo "file upload success";
         $data_upload = $this->upload->data();
         $dataImage['ID_image'] = $this->input->post('ID_image');
         $dataImage['id_row'] = $this->input->post('row_id');
         $dataImage['title_image'] = $this->input->post('file_name');
         $dataImage['nome_image_doct'] = $data_upload['file_name'];
         //var_dump($dataAnexo);
         // die;
         $Row_File = 0;
         if ($this->input->post('ID_image') != null) {
             $dataImage['UPDATE_BY'] = $user_name;
             $dataImage['LAST_UPDATE'] = $dataAtualizacao;
             $Row_File = $this->atualizarDoct->atualiza_image($dataImage);
         } else {
             $dataImage['CREATED_BY'] = $user_name;
             $dataImage['CREATED'] = $dataAtualizacao;
             $Row_File = $this->documentoModel->cadastrar_imagem($dataImage);
             $rowOBJ = $Row_File[0];
             $param = $rowOBJ->id_image;
             //Salvar o wrs na tabela main
             $Novo_main = null;
             $row_main['ROW_ID'] = $this->input->post('row_id');
             $row_main['parent_TBL'] = 'tbl_doct';
             $row_main['parent_id'] = $this->input->post('row_id');
             $row_main['CHILD_ID'] = $param;
             $row_main['CHILD_TBL'] = 'tbl_image_doct';
             $Novo_main = $this->documentoModel->cadastrar_main($row_main);
         }
         if ($Row_File != 0) {
             redirect('/detalhes_documento/getTheRow/' . $this->input->post('row_id') . '');
         }
     } else {
         echo "file upload failed";
         redirect(base_url("/index.php/continuar_documento/Imagens_doct/" . $row_id . ""));
         echo display_errors();
     }
 }
Beispiel #11
0
 }
 ossim_valid($column, OSS_DIGIT, 'illegal:' . _("Widget Column"));
 ossim_valid($order, OSS_DIGIT, 'illegal:' . _("Widget Row"));
 if (ossim_error()) {
     $info_error[] = ossim_get_error();
     ossim_clean_error();
     $error = true;
 }
 if ($widget_type == 'report' && !$pro) {
     $info_error[] = _('Report section is only available in professional version');
     $error = true;
 }
 if ($error == true) {
     $step = "5";
     $class = "wr_show";
     $errors_txt = display_errors($info_error);
 } else {
     $new_widget = new Dashboard_widget();
     $new_widget->set_id($id_content);
     $new_widget->set_type_id($widget_id);
     $new_widget->set_panel_id($tab);
     $new_widget->set_user($owner);
     $new_widget->set_col($column);
     $new_widget->set_fil($order);
     $new_widget->set_height($widget_height);
     $new_widget->set_title($widget_title);
     $new_widget->set_help($widget_help);
     $new_widget->set_refresh($widget_refresh);
     $new_widget->set_file($widget_url);
     $new_widget->set_type($widget_type);
     $new_widget->set_asset($widget_asset);
Beispiel #12
0
	
</head>

<body>

<div class='c_back_button' style="display: block;">
    <input type='button' class="av_b_back" onclick="document.location.href='../incidents/index.php';return false;"/>
</div>

<?php 
/*
 * FORM FOR NEW/EDIT TAG
 */
if ($action == 'new1step' || $action == 'mod1step') {
    if ($error == TRUE) {
        echo display_errors($info_error);
    }
    $action = str_replace('1', '2', $action);
    ?>
	
	<div class="legend">
        <?php 
    echo _('Values marked with (*) are mandatory');
    ?>
    </div>	
	
	<form method="post" action="?action=<?php 
    echo $action;
    ?>
&id=<?php 
    echo Util::htmlentities($id);
function handle_document_generation($cart_order_id, $invoice, $url, $document_type)
{
    $connection_parameters = get_api_connection_parameters("./config.ini");
    $nazwaUsera = $connection_parameters['API_LOGIN'];
    //login do ifirma
    $klucz_hex = $connection_parameters['API_KEY_FAKTURA'];
    //klucz wygenerowany w ifirmie
    //$typ_faktury = 'orygkopia'; //typ faktury w pdfie: np.dup, kopia, oryg, orygkopia
    $nazwaKlucza = "faktura";
    $typ_pliku = "json";
    //rodzaj pliku, ktory wysylamy
    $typ_pobierz = "pdf";
    //oczekiwana odpowiedz
    $url_get = "https://www.ifirma.pl/iapi/fakturakraj/";
    $klucz = hexToStr($klucz_hex);
    $exception = false;
    $bledy = array();
    $content = $invoice->toJson();
    $curlWysylanieHandle = curl_init($url);
    $faktura_do_poprawki = false;
    ustaw_odpowiedni_miesiac_ksiegowy($invoice, $connection_parameters);
    $rsp = wyslij_jedna($typ_pliku, $content, $klucz, $url, $nazwaUsera, $nazwaKlucza, $curlWysylanieHandle);
    $tab = json_decode($rsp, true);
    if (is_response_status_ok($tab['response']['Kod'])) {
        $url_pliku = '';
        $invoice_number = $tab['response']['Identyfikator'];
        if (isset($typ_faktury)) {
            $url_pliku = $url_get . $invoice_number . '.' . $typ_pobierz . '.' . $typ_faktury;
        } else {
            $url_pliku = $url_get . $invoice_number . '.' . $typ_pobierz;
        }
        $curlHandle = curl_init($url_pliku);
        curl_close($curlHandle);
        unset($curlHandle);
        add_info_about_generated_document($document_type, $cart_order_id, $invoice_number, get_class($invoice));
        //-------
        $generated_invoice_array = handle_invoice_download($cart_order_id, "json");
        $invdetails = $invoice->getZaplacono();
        $invpozycje = $invoice->getPozycje();
        if ($generated_invoice_array['response']['Zaplacono'] != $invdetails) {
            $faktura_do_poprawki = true;
        }
        $l = 0;
        foreach ($generated_invoice_array['response']['Pozycje'] as $pozycja) {
            $vatDwa = (double) $invpozycje[$l]['StawkaVat'];
            //->getStawkaVat();
            $cenaDwa = (double) $invpozycje[$l]['CenaJednostkowa'];
            //->getCenaJednostkowa();
            $vatRaz = (double) $pozycja['StawkaVat'];
            $cenaRaz = (double) $pozycja['CenaJednostkowa'];
            ++$l;
            if ($vatRaz != $vatDwa || $cenaRaz != $cenaDwa) {
                $faktura_do_poprawki = true;
            }
        }
        if ($faktura_do_poprawki == true) {
            add_info_about_invoice_fault($cart_order_id);
            echo "Wykryto drobne nieprawidlowosci.<br/> Możliwa przyczyna: -różnica w sposobie zaokrąglania kwoty podatku.<br />";
            echo "Proszę dokonać weryfikacji poprawności wystawionej faktury z poziomu serwisu www.ifirma.pl";
        }
        //-----------
    } else {
        $bledy = przechwyc_bledy($content, $tab, $bledy);
    }
    curl_close($curlWysylanieHandle);
    unset($curlWysylanieHandle);
    if (count($bledy) > 0) {
        display_errors($bledy);
    } else {
        redirect_to_order_page($cart_order_id);
    }
}
Beispiel #14
0
    }
    ?>
                    <?php 
}
?>
                    <a href="status"><?php 
echo t('Backend Status');
?>
</a>
<?php 
if (Modules::getModule('backend_log')) {
    ?>
                    &nbsp; | &nbsp;
                    <a href="backend_log"><?php 
    echo t('Backend Logs');
    ?>
</a>
<?php 
}
?>
                </div></td>
        </tr>
        </table></td>

</tr>
</table>

<?php 
// Errors go here
display_errors();
flush();
Beispiel #15
0
/**
 * Checks a registration request for invalid inputs
 *
 * @access public
 * @return true
 */
function complete_upload_match_media()
{
    if (valid_request(array(isset($_GET['match_id']), isset($_FILES['match_media']), isset($_POST['description'])))) {
        require CLASS_PATH . 'class.upload.php';
        global $db;
        global $smarty;
        if (strlen($_POST['description']) < 2 || strlen($_POST['description']) > 20) {
            display_errors(751);
            return true;
        }
        $upload = new Upload($_FILES['match_media']);
        if ($upload->uploaded) {
            //getting the internal file name out of the current time
            $name = microtime();
            $name = substr($name, 2, 8) . substr($name, 11);
            $upload->file_new_name_body = $name;
            $upload->allowed = array('application/zip', 'image/*');
            $upload->process(MATCH_MEDIA_PATH);
            if ($upload->processed) {
                $sql = "add_match_media(" . $_GET['match_id'] . ",\n                                            " . $_SESSION['user_id'] . ",\n                                            '" . $_POST['description'] . "',\n                                            '" . $upload->file_dst_name . "', \n                                            " . filesize($upload->file_dst_pathname) . ")";
                $db->run($sql);
                if ($db->error_result) {
                    display_errors(750);
                } else {
                    display_success("upload_match_media");
                    $smarty->assign('content', $smarty->fetch("succes.tpl"));
                }
            } else {
                display_errors(750);
            }
            $upload->clean();
        } else {
            display_errors(750);
            return true;
        }
    }
    return true;
}
Beispiel #16
0
if (!$result) {
    redirect_to("index.php");
}
?>
<div class="row transperent-background">
	<div class="col-md-4">
		<br />
		<img src="<?php 
echo $row["Picture"];
?>
" class="img-thumbnail img-responsive">
		<br />
		<br />
		<?php 
if (isset($_GET['error'])) {
    display_errors($_GET['error']);
}
?>
		<form action="upload.php?email=<?php 
echo $row["Email"];
?>
" method="post" enctype="multipart/form-data">
			<p>
				<input id="input-1a" name="picture" type="file" class="file" data-show-preview="true">
			</p>
		</form>
	</div>
	<div class="col-md-8">
		<br />

		<div class="panel panel-success">
Beispiel #17
0
include "page_template.php";
?>

                            <input type="submit" name="submit" value="Edit Information">
                            &nbsp; &nbsp;
                            <a href="delete_page.php?info=<?php 
echo urlencode($table2[0]);
?>
" onclick="return confirm('Do you really want to delete this?')">Delete Page</a>

                            <br><br><a href="content.php">Cancel</a>
                        </form>
                        <div >
                            <?php 
if (!empty($errors)) {
    echo "<h4 class=\"error\"> You have the following errors </br>" . display_errors($errors) . "</h4>";
} else {
    echo "<h4 class=\"success\">{$success}</h4>";
}
?>

                        </div>

                    </div>


                </td>

            </tr>
    </div>
    </table>
Beispiel #18
0
    $error = str_replace(array('{script}', '{/script}'), array('<script>', '</script>'), $this->session->flashdata('error'));
    // convert script tags
    echo display_errors($this->session->flashdata('error'), 'ico error ico_error');
} elseif ($this->session->flashdata('success') and $this->session->flashdata('success') !== TRUE and $this->session->flashdata('success') !== '1') {
    $success = str_replace(array('{script}', '{/script}'), array('<script>', '</script>'), $this->session->flashdata('success'));
    // convert script tags
    ?>
	<div class="success ico ico_success"><?php 
    echo $success;
    ?>
</div>
<?php 
} else {
    ?>
	<?php 
    echo display_errors(NULL, 'ico error ico_error');
}
?>

<?php 
if (!empty($last_updated)) {
    ?>
<p class="ico ico_info last_updated">
	<?php 
    echo $last_updated;
    ?>
</p>
<?php 
} elseif ($this->session->flashdata('info')) {
    ?>
<p class="ico ico_info">
Beispiel #19
0
function complete_edit_user_rights()
{
    if (valid_request(array(isset($_GET['user_id'])))) {
        global $db;
        global $smarty;
        if (!isset($_POST['admin'])) {
            $admin_perm = 0;
        } else {
            $admin_perm = 1;
        }
        if (!isset($_POST['managment'])) {
            $managment_perm = 0;
        } else {
            $managment_perm = 1;
        }
        if (!isset($_POST['tech'])) {
            $tech_perm = 0;
        } else {
            $tech_perm = 1;
        }
        $sql = "edit_user_rights(" . $_GET['user_id'] . ",\n                                     " . $admin_perm . ",\n                                     " . $tech_perm . ",\n                                     " . $managment_perm . ")";
        $db->run($sql);
        if ($db->error_result) {
            display_errors(1);
        } else {
            display_success("edit_user_rights");
        }
    }
    return true;
}
Beispiel #20
0
<a class="admin_back_link" href="<?php echo $back_url ?>">&lt;&lt; Back</a>

<h2><?php echo hen($title) ?></h2>

<?php display_errors() ?>

<form action="<?php echo $form_url ?>" enctype="multipart/form-data" method="POST">
    <label>Name</label>
    <input type="text" name="title" value="<?php echo hen($title) ?>" />
    <input type="hidden" name="old_title" value="<?php echo hen($title) ?>" />

    <label>Image</label>

<?php
    if($image != '')
        $image = '/res/categories/' . hen($image);
    else 
        $image = '/res/static/no_category.jpg';
?>


    <table>
        <tr>
            <td>
                <img src="<?php echo hen($image) ?>" alt="Current Image" />
            </td>

            <td>
                <p>Upload new image:</p>
                <input type="file" name="file" />
            </td>
Beispiel #21
0
             }
         }
         if ($ERROR) {
             $STEP = 1;
         }
         break;
     case 1:
     default:
         $super_for_keys = 'true';
         continue;
         break;
 }
 switch ($STEP) {
     case 2:
         if ($ERROR) {
             echo display_errors();
         }
         if ($NOTICE) {
             echo display_notices();
         }
         if ($SUCCESS) {
             echo display_success();
         }
         break;
     case 1:
     default:
         $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/AutoCompleteList.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>";
         $PROCESSED["prov_state"] = isset($PROCESSED["province_id"]) && $PROCESSED["province_id"] ? (int) $PROCESSED["province_id"] : (isset($PROCESSED["apartment_province"]) && $PROCESSED["apartment_province"] ? $PROCESSED["apartment_province"] : "");
         $ONLOAD[] = "provStateFunction(\$F(\$('addApartmentForm')['countries_id']))";
         $ONLOAD[] = "display_key_contact(" . $super_for_keys . ")";
         /**
Beispiel #22
0
                break;
            case 'pm':
                display_pm();
                break;
            case 'register':
                display_registration();
                break;
            case 'season_details':
                display_season_details();
                break;
            case 'team':
                display_team();
                break;
            case 'upload_match_media':
                display_upload_match_media();
                break;
            case 'user':
                display_user_profile();
                break;
        }
    } else {
        display_errors(250);
    }
    // permission denied
}
//assigning page parts that are always visible
$smarty->assign('head', $smarty->fetch("head.tpl"));
$smarty->assign('left_navi', $smarty->fetch("left_navi.tpl"));
$smarty->assign('right_navi', $smarty->fetch("right_navi.tpl"));
$smarty->assign('footer', $smarty->fetch("footer.tpl"));
$smarty->display('index.tpl');
Beispiel #23
0
<a class="admin_back_link" href="<?php echo hen($back_url) ?>">&lt;&lt; Back</a>

<h2>Edit Category Listing</h2>

<?php display_errors(); ?>

<form action="<?php echo hen($form_url) ?>" enctype="multipart/form-data" method="post" />
    <label>Title</label>

    <input type="hidden" name="old_title" value="<?php echo hen($otitle) ?>" />
    <input type="text" name="title" value="<?php echo hen($title) ?>" />

    <label>In Category</label>

    <select name="category">
        <option value="0">Uncategorised</option>

        <?php foreach($categories as $category): ?>
            <?php if($member_category == $category['ID']): ?> 
            <option value="<?php echo hen($category['ID']) ?>" Selected="Selected"><?php echo hen($category['Name']) ?></option>
            <?php else: ?>
            <option value="<?php echo hen($category['ID']) ?>"><?php echo hen($category['Name']) ?></option>
            <?php endif; ?>
        <?php endforeach; ?>
    </select>

    <input class="submit" type="Submit" name="Submit" value="Save" />
</form>
Beispiel #24
0
/**
 * Assignes $pm_info - information about the last pm between 2 users if available
 * @access public
 * @return true
 */
function assign_pm_info($pm_id)
{
    global $smarty;
    global $db;
    $sql = "get_pm_info(" . $pm_id . ")";
    $db->run($sql);
    if ($db->empty_result) {
        display_errors(1);
        return true;
    }
    $pm = $db->get_result_row();
    if ($pm['to'] != $_SESSION['user_id'] && $pm['from'] != $_SESSION['user_id']) {
        display_errors(900);
        return true;
    }
    $pm['message'] = parse_bb_code($pm['message']);
    $smarty->assign('pm_info', $pm);
    return true;
}
Beispiel #25
0
function get_config_files()
{
    // return 2-elements array with content of
    // config.inc.php config-plugins.inc.php
    global $root_dir;
    $vars = $_POST;
    foreach (array('@DB_PLUGINS@', '@PAYMENT_PLUGINS@', '@PROTECT_PLUGINS@') as $varname) {
        foreach ((array) $vars[$varname] as $k => $v) {
            $vars[$varname][$k] = "'" . $v . "'";
        }
    }
    $vars['@DB_PLUGINS@'] = join(',', (array) $vars['@DB_PLUGINS@']);
    $vars['@PAYMENT_PLUGINS@'] = join(',', (array) $vars['@PAYMENT_PLUGINS@']);
    $vars['@PROTECT_PLUGINS@'] = join(',', (array) $vars['@PROTECT_PLUGINS@']);
    srand(time());
    $vars['@ADMIN_PASS@'] = crypt($vars['@ADMIN_PASS@']);
    $f = file($fn = "{$root_dir}/config-dist.inc.php");
    if (!$f) {
        display_errors(array("Cannot open {$fn} . Please upload this file"));
    }
    $f1 = array();
    foreach ($f as $k1 => $v1) {
        foreach ($vars as $k => $v) {
            $v1 = str_replace($k, $v, $v1);
        }
        $f1[] = $v1;
    }
    $f2 = array();
    return array(join('', $f1), join('', $f2));
}
Beispiel #26
0
                <!--<p class="help-block">Password should be at least 6 characters</p>-->
              </div>
            </div>
         
            <div class="control-group <?php 
echo $transerrors['password_confirm'] ? 'has-error' : null;
?>
">
              <label class="control-label" for="password_confirm"><?php 
echo $this->trans('user.signup.form.password_confirm');
?>
</label>
              <div class="controls">
                <input id="password_confirm" name="password_confirm" placeholder="" class="form-control input-lg" type="password">
                <?php 
display_errors($transerrors['password_confirm']);
?>
                <!--<p class="help-block">Please confirm password</p>-->
              </div>
            </div>
         
            <div class="control-group">
              <!-- Button -->
              <div class="controls">
                <button class="btn btn-success"><?php 
echo $this->trans('user.signup.form.button');
?>
</button>
              </div>
            </div>
          </fieldset>
 /**
  * Displays errors
  *
  * @uses display_errors()
  * @uses PMA_lang_name()
  */
 public function displayErrors()
 {
     $this->_validate();
     if (count($this->errors) == 0) {
         return;
     }
     foreach ($this->errors as $system_path => $error_list) {
         if (isset($this->system_paths[$system_path])) {
             $path = $this->system_paths[$system_path];
             $name = PMA_lang_name($path);
         } else {
             $name = $GLOBALS["strConfigForm_{$system_path}"];
         }
         display_errors($name, $error_list);
     }
 }
<?php

if (!empty($error)) {
    add_errors($error);
    echo display_errors('error ico_error');
} elseif ($this->session->flashdata('error') and $this->session->flashdata('error') !== TRUE and $this->session->flashdata('success') !== '1') {
    add_errors($this->session->flashdata('error'));
    echo display_errors('error ico_error');
} elseif ($this->session->flashdata('success') and $this->session->flashdata('success') !== TRUE and $this->session->flashdata('success') !== '1') {
    ?>
	<div class="success ico_success"><?php 
    echo $this->session->flashdata('success');
    ?>
</div>
<?php 
} else {
    ?>
	<?php 
    echo display_errors('error ico_error');
}
Beispiel #29
0
			<?php 
echo navigation($sel_subject, $sel_page, $public = false);
?>
			<br />
			<a href="new_subject.php">+ Add a new subject</a>
		</td>
		<td id="page">
			<h2>Adding New Page</h2>
			<?php 
if (!empty($message)) {
    echo "<p class=\"message\">" . $message . "</p>";
}
?>
			<?php 
if (!empty($errors)) {
    display_errors($errors);
}
?>
			
			<form action="new_page.php?subj=<?php 
echo $sel_subject['id'];
?>
" method="post">
				<?php 
$new_page = true;
?>
				<?php 
include "page_form.php";
?>
				<input type="submit" name="submit" value="Create Page" />
			</form>
Beispiel #30
0
         if (validate_secimg()) {
             $fetchpage = false;
         } else {
             $pagetitle .= ' ' . _BC_DELIM . ' Error';
             $error = 'Incorrect security code. Please type the code exactly as it appears.';
         }
     } else {
         $pagetitle .= ' ' . _BC_DELIM . ' ' . $dl_title;
         $error = '';
     }
 } else {
     $pagetitle .= ' ' . _BC_DELIM . ' Confirmation';
 }
 if ($fetchpage) {
     require_once 'header.php';
     $cpgtpl->assign_vars(array('DL_DETAIL_MENU' => dl_detail_menu($get_id, $dl_title, $dl_pick, $dl_active, 2), 'L_DL_FILE' => _DLP_DLNOW, 'S_DL_NOW' => false, 'S_DL_DESC1' => 'Please type the security code displayed below.', 'S_DL_DESC2' => 'Clicking "Download Now" will transfer you to the appropriate download location.', 'S_ERRORS' => !empty($error) ? display_errors($error) : '', 'U_DL_FORM' => URL::index("&amp;get={$get_id}&amp;mirror={$mirror_id}"), 'L_SECURITYCODE' => _SECURITYCODE, 'IMG_SECCODE' => generate_secimg(), 'L_TYPESECCODE' => _TYPESECCODE, 'L_GET_DOWNLOAD' => _DLP_DLNOW));
 } else {
     if (!is_admin() && $dl_submitter != is_user()) {
         $time = time();
         $time_year = generate_date($time, 'Y');
         $time_month = generate_date($time, 'm');
         if (!$db->sql_query("UPDATE " . $dl_prefix . "_stats \n\t\t\t\t\t\tSET hits=hits+1 \n\t\t\t\t\t\tWHERE id='{$get_id}' AND year='{$time_year}' AND month='{$time_month}'", true) || !$db->sql_affectedrows()) {
             $db->sql_query('INSERT INTO ' . $dl_prefix . "_stats \n\t\t\t\t\t\t(id, year, month, hits) \n\t\t\t\t\t\tVALUES \n\t\t\t\t\t\t({$get_id}, {$time_year}, {$time_month}, 1)", false);
         }
     }
     if ($remote && !$dl_config['leech_remote'] || !$remote && !$dl_config['leech_local']) {
         url_refresh($dl_url, 5);
         require_once 'header.php';
         $cpgtpl->assign_vars(array('DL_DETAIL_MENU' => dl_detail_menu($get_id, $dl_title, $dl_pick, $dl_active, 2), 'L_DL_FILE' => _DLP_DLNOW, 'S_DL_NOW' => 'Your download will begin in five seconds...<br /><br />If the file has not started to download after five seconds, get it <a href="' . $dl_url . '">here</a>.'));
     } else {
         require_once 'includes/classes/cpg_file.php';