Example #1
0
function pratiche_element_1()
{
    if (check_perm_mod("pratiche", "r") == 1) {
        $thislist = load_fwobject("lists", "pratiche", 1);
        //print_r ($thislist);
        $output = draw_list($thislist, "pratiche");
        return $output;
    } else {
        return "";
    }
}
Example #2
0
function calendar_element_2()
{
    if ($_GET[scad_type] == 1) {
        $list_type = 5;
    } elseif ($_GET[scad_type] == 2) {
        $list_type = 4;
    } else {
        $list_type = 2;
    }
    if (check_perm_mod("calendar", "r") == 1) {
        $thislist = load_fwobject("lists", "calendar", $list_type);
        //print_r ($thislist);
        $output = draw_list($thislist, "calendar");
        return $output;
    } else {
        return "";
    }
}
Example #3
0
        if ($prevtag_pre) {
            $prevtag .= " | ";
        } else {
            $prevtag .= "<tr><td>";
        }
        print "{$prevtag} <a onFocus=\"this.blur()\" href='?display=2&mode=file&skip={$nextskip}'>Next Page</a></td></tr>";
    } elseif ($skip) {
        print "{$prevtag}";
    }
}
?>

<h3><?php 
echo _("Download Fax TIFF Files:");
?>
</h3>

<?php 
$file_array = build_list();
$numf = count($file_array);
if ($_REQUEST['del']) {
    $rmcmd = "rm -f \"" . $path_to_dir . "/" . $_REQUEST['del'] . "\"";
    exec($rmcmd);
    $file_array = build_list();
}
print "<table width=99% border=0 cellspacing=0 cellpadding=0><tr><td>";
print "<h5>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATE&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HOURS</h5>";
print "</td></tr>";
$file_array = build_list();
draw_list($file_array, $path_to_dir, $perpage, $skip, $skipped, $index);
print "</table>";
Example #4
0
function menage_search1($search, $target_res = 2, $format_res = 0)
{
    global $DB, $CONF, $SEARCH_TEMPLATE;
    //Init della ricerca
    foreach ($search[fields] as $key => $field) {
        list($type, $options) = explode("||", $field[content]);
        unset($target);
        foreach (explode("||", $field[search_field]) as $trg) {
            $target[] = explode("-", $trg);
        }
        unset($cnt);
        $cntt = array();
        foreach ($target as $st) {
            if (!isset($SQL_SEARCH[$st[0]])) {
                if (!isset($search[tablesql][$st[0]])) {
                    $SQL_SEARCH[$st[0]] = "SELECT * FROM " . $st[0] . " WHERE %[PERM]% ";
                } else {
                    $SQL_SEARCH[$st[0]] = $search[tablesql][$st[0]];
                }
            }
            if ($cntt[$st[0]] == 0) {
                $SQL_SEARCH[$st[0]] .= " AND ( ";
            } else {
                $SQL_SEARCH[$st[0]] .= " OR (";
            }
            $cntt[$st[0]]++;
            // Create SQL Query according to search type
            if (is_array($_GET[$key]) && isset($_GET[$key][realval]) && count($_GET[$key][realval]) > 1) {
                $tcnt = count($_GET[$key][realval]);
                $linarray = 1;
            } elseif (is_array($_GET[$key]) && count($_GET[$key]) > 1 && !isset($_GET[$key][realval])) {
                $tcnt = count($_GET[$key]);
                $linarray = 1;
            } else {
                $tcnt = 1;
                $linarray = 0;
            }
            $opened = 0;
            for ($cnt = 0; $cnt < $tcnt; $cnt++) {
                unset($this_round);
                if (is_array($_GET[$key]) && is_array($_GET[$key][realval])) {
                    $curval = $_GET[$key][realval][$cnt];
                } elseif (is_array($_GET[$key])) {
                    $curval = $_GET[$key][$cnt];
                } else {
                    $curval = $_GET[$key];
                }
                if (strlen($curval) > 0) {
                    if ($cnt > 0) {
                        $SQL_SEARCH[$st[0]] .= " OR ";
                    }
                    if ($opened != 1 && $linarray == 1) {
                        $SQL_SEARCH[$st[0]] .= " ( ";
                        $opened = 1;
                    }
                    switch ($type) {
                        case "text":
                            $SQL_SEARCH[$st[0]] .= $st[1] . "='" . $curval . "' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "text_like":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " LIKE '%" . $curval . "%' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "text_start":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " LIKE '" . $curval . "%' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "text_end":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " LIKE '%" . $curval . "' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "text_word":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " LIKE '% " . $curval . " %' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "text_ext":
                            $SQL_SEARCH[$st[0]] .= ext_search($st[1], $curval);
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "user_perm":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " LIKE '%U" . $curval . "=33333%'";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = " ";
                            }
                            break;
                        case "calendar_owner":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " LIKE '" . $curval . ",,%' OR " . $st[1] . " LIKE '%,," . $curval . "' OR " . $st[1] . " LIKE '%,," . $curval . ",,%' OR " . $st[1] . " LIKE '" . $curval . "'";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = " ";
                            }
                            break;
                        case "num_less":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " <= '" . $curval . "' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "num_more":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " >= '" . $curval . "' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                        case "num_equal":
                            $SQL_SEARCH[$st[0]] .= $st[1] . " = '" . $curval . "' ";
                            if (strlen($curval) > 0) {
                                $SEARCH_FIELDS[$st[0]][$st[1]][] = $curval;
                            }
                            break;
                    }
                    $done_seart[$st[0]]++;
                }
            }
            if ($linarray == 1 && $opened == 1) {
                $SQL_SEARCH[$st[0]] .= " ) ";
            }
            $SQL_SEARCH[$st[0]] .= ')';
            $SQL_SEARCH[$st[0]] = str_replace("AND ( )", "", $SQL_SEARCH[$st[0]]);
        }
        /*		//Close sql )
        
        		
        		foreach($SQL_SEARCH as $table => $sql)
        		{
        				$SQL_SEARCH[$table].=')';
        
        				$SQL_SEARCH[$table]=str_replace("AND ( )","",$SQL_SEARCH[$table]);
        		}
        	*/
    }
    foreach ($search[tables] as $table => $options) {
        list($TABLES[$table][list_var], $TABLES[$table][title], $TABLES[$table][options], $TABLES[$table][permission]) = explode("||", $options);
        //orig
        //list($TABLES[$table][list_var],$TABLES[$table][title],,$TABLES[$table][permission])=explode("||",$options);//0k variante 1
        //list($TABLES[$table][list_var],,$TABLES[$table][options],$TABLES[$table][permission])=explode("||",$options);//ok variante 2
        //list($TABLES[$table][list_var],,$TABLES[$table][options],$TABLES[$table][permission])=explode("||",$options);
    }
    //CHECK FOR EMPTY SEARCH
    if ($search[allow_empty] != 1) {
        foreach ($SQL_SEARCH as $table => $sql) {
            if ($done_seart[$table] == 0) {
                unset($SQL_SEARCH[$table]);
            }
        }
    }
    //Check for result number
    foreach ($SQL_SEARCH as $table => $sql) {
        list($perm_type, $perm_parent) = explode(";;", $TABLES[$table][permission]);
        if ($perm_type == 0) {
            $sql = str_replace("%[PERM]%", "1=1", $sql);
        }
        //print perm_sql_read($sql,$table).'<br><br>';
        $rs = @$DB->Execute(perm_sql_read($sql, $table));
        $res = $rs->RecordCount();
        $totr += $res;
        $RESULTNUM[$table] = $res;
    }
    $RESULTNUM[total] = $totr;
    if (isset($search[title])) {
        $output = str_replace("%[TITLE]%", $search[title], $SEARCH_TEMPLATE[search_title]);
    }
    if (isset($search[result_txt])) {
        $output .= str_replace("%[DESC]%", str_replace("%[FOUND]%", $RESULTNUM[total], $search[result_txt]), $SEARCH_TEMPLATE[search_desc]);
    }
    //Render tables results
    $output .= '<table width="100%" border=0 cellpadding=5>';
    foreach ($SQL_SEARCH as $table => $sql) {
        foreach (explode(";;", $TABLES[$table][options]) as $vopt) {
            list($opt, $optval) = explode("::", $vopt);
            switch ($opt) {
                case "exp":
                    if ($optval == 1) {
                        $start_vis = 1;
                    }
                    break;
                case "lock":
                    if ($optval == 1) {
                        $noexp = 1;
                        $start_vis = 1;
                    }
                    break;
            }
        }
        if (isset($_GET[$table . "_ordfield"]) || isset($_GET[$table . "_ordtype"]) || isset($_GET[$table . "_st"]) || isset($_GET[$table . "_exp"]) || isset($_GET[$table . "_imp"])) {
            $start_vis = 1;
        }
        if ($start_vis == 1) {
            $startpic = $SEARCH_TEMPLATE[group_icon_close];
            $cur_vis = "";
        } else {
            $startpic = $SEARCH_TEMPLATE[group_icon_open];
            $cur_vis = "style=\"display:none\"";
        }
        if ($noexp != 1) {
            $more_tit = '<a	href="javascript:rigaDOWN(Array(\'' . $table . '\'),\'ico_' . $table . '\',\'' . $table . '\',\'' . $SEARCH_TEMPLATE[group_icon_close] . '\',\'' . $SEARCH_TEMPLATE[group_icon_open] . '\')"><img src="' . $startpic . '" name="ico_' . $table . '" width="16" height="16" border="0" id="ico_' . $table . '"></a>';
        } else {
            $more_tit = "";
        }
        if ($TABLES[$table][title] != "") {
            $output .= '<tr><td><h5>' . $TABLES[$table][title] . ' ' . $more_tit . '</h5></td></tr>';
        }
        require_once $CONF[path_base] . $CONF[dir_modules] . $table . "/lists.php";
        $curlist = $LISTS[$table][$TABLES[$table][list_var]];
        if (isset($SEARCH_FIELDS[$table])) {
            foreach ($SEARCH_FIELDS[$table] as $fs => $sterm) {
                if (isset($curlist[search_options])) {
                    $curlist[search_options] .= "||";
                }
                $curlist[search_options] .= "{$fs}::" . implode(";;", $sterm);
            }
        }
        $curlist[sql_select] = $sql;
        if (isset($curlist[search_options])) {
            list($perm_type, $perm_parent) = explode(";;", $TABLES[$table][permission]);
            if ($perm_type == 0) {
                $sql = str_replace("%[PERM]%", "1=1", $sql);
            }
            $curlist[sql_select] = $sql;
            $curlist[options] .= "||search::1";
        }
        //print $sql;
        //PRINT
        if ($target_res == 0) {
            $curlist[box_title] = "";
            unset($curlist[search_options]);
            $output .= '<tr id="' . $table . '" ' . $cur_vis . '><td>' . draw_list($curlist, $table) . '</td></tr>';
        } elseif ($target_res == 1) {
            return draw_list_file($curlist, $table);
        } elseif ($target_res == 2) {
            if ($format_res == 1) {
                $output .= '<tr id="' . $table . '" ' . $cur_vis . '><td>';
                $rs = @$DB->Execute(perm_sql_read($sql, $table));
                while (!$rs->EOF) {
                    $res = $rs->FetchRow();
                    $thisobj = load_fwobject("show", $table, 0);
                    $output .= draw_object($thisobj, $res[id], $table) . "<br>\n";
                }
                $output .= '</tr></td>';
            } else {
                $curlist[box_title] = "";
                $output .= '<tr id="' . $table . '" ' . $cur_vis . '><td>' . draw_list($curlist, $table) . '</td></tr>';
            }
        }
    }
    $output .= '</table>';
    return $output;
}
Example #5
0
function drawBottom()
{
    global $_josh, $modules, $helpdeskOptions, $helpdeskStatus, $modulettes, $page;
    $return = '
			</div>
			<div id="right">
				<div id="tools">
					<a class="right button" href="/index.php?action=logout">' . getString('log_out') . '</a>
					' . getString('hello') . ' <a href="/staff/view.php?id=' . $_SESSION['user_id'] . '"><b>' . $_SESSION['full_name'] . '</b></a>';
    //search
    $return .= '<form name="search" accept-charset="utf-8" method="get" action="/staff/search.php" onsubmit="javascript:return doSearch(this);">
			<input type="text" name="q" placeholder="' . getString('staff_search') . '"/>
		</form>';
    //channel or language selectors
    if (getOption('channels')) {
        //$return .= draw_form_select('channel_id', 'SELECT id, title' . langExt() . ' title FROM channels WHERE is_active = 1 AND is_private = 0 ORDER BY precedence', $_SESSION['channel_id'], false, 'channels', 'url_query_set(\'channel_id\', this.value)', getString('networks_view_all'));
        $return .= draw_form_select('channel_id', 'SELECT c.id, c.title' . langExt() . ' title FROM channels c WHERE c.is_active = 1 AND (c.is_private = 0 OR (SELECT COUNT(*) FROM users_to_channels u2c WHERE u2c.channel_id = c.id AND u2c.user_id = ' . user() . ') > 0) ORDER BY precedence', $_SESSION['channel_id'], false, 'channels', 'url_query_set(\'channel_id\', this.value)', getString('networks_view_all'));
    }
    if (getOption('languages')) {
        $return .= draw_form_select('language_id', 'SELECT id, title FROM languages ORDER BY title', $_SESSION['language_id'], true, 'languages', 'url_query_set(\'language_id\', this.value)');
    }
    //links
    $links = db_table('SELECT title' . langExt() . ' title, url FROM links WHERE is_active = 1 ORDER BY precedence');
    foreach ($links as &$l) {
        $l = draw_link($l['url'], $l['title'], true);
    }
    $return .= draw_div('#links', draw_container('h3', getString('links')) . (admin() ? draw_link('/a/admin/links.php', getString('edit'), false, array('class' => 'right button')) : false) . draw_list($links));
    $return .= '</div>';
    foreach ($modules as $m) {
        $return .= '
		<table class="right ' . $m['folder'] . '" cellspacing="1">
			<tr>
				<td colspan="2" class="head" style="background-color:#' . $m['color'] . ';">
					<a href="/' . $m['folder'] . '/" class="left">' . $m['title'] . '</a>
					' . draw_img('/images/arrows-new/' . format_boolean($m['is_closed'], 'up|down') . '.png', url_query_add(array('module' => $m['id']), false)) . '
				</td>
			</tr>';
        if (!$m['is_closed']) {
            include DIRECTORY_ROOT . DIRECTORY_SEPARATOR . $m['folder'] . DIRECTORY_SEPARATOR . 'pallet.php';
        }
        $return .= '</table>';
    }
    $return .= '</div>
	<div id="footer">';
    //if (admin()) $return .= 'page rendered in ' . format_time_exec() . '<br/>';
    $return .= getString('copyright') . '<br/>';
    if (getOption('legal')) {
        $return .= draw_link('/login/legal.php', getString('legal_title'));
    }
    $return .= '</div></div>
		<div id="subfooter"></div>
	</body>
</html>';
    //record pageview
    if ($page['id'] && user()) {
        db_query('INSERT INTO pages_views ( page_id, user_id, timestamp ) VALUES ( ' . $page['id'] . ', ' . user('NULL') . ', GETDATE() )');
    }
    return $return;
}
Example #6
0
<?php

include "../../../framework/framework.php";
// Define page specific text for template
$PAGE[TXT_TITLE] = ADMIN_MENU_0_5;
$PAGE[PAGE_INTITLE] = ADMIN_MENU_0_5 . " (tariffario forense)";
$PAGE[PAGE_PICTITLE] = "ico_admin_med.gif";
$module = "admin";
template_init();
template_define_elements();
ob_start();
if (check_perm_mod($module, "r") == 1) {
    $thislist = load_fwobject("lists", "admin", 16);
    print draw_list($thislist, $module);
} else {
    $response[title] = FW_ERROR_NO_PERM;
    $response[text] = FW_ERROR_NO_PERM_TXT;
    $iserror = 1;
    print draw_response($response);
}
$PAGE[PAGE_CONTENT] = ob_get_contents();
ob_end_clean();
final_render();
Example #7
0
        // normal moh dir
        if (isset($_REQUEST['del'])) {
            $del = $_REQUEST['del'];
            if (strpos($del, "\"") || strpos($del, "\\'") || strpos($del, "\\;")) {
                print "You're trying to use an invalid character. Please don't.\n";
                exit;
            }
            if ($numf == 1 && $category == "default") {
                echo "<h5>" . _("You must have at least one file for On Hold Music.  Please upload one before deleting this one.") . "</h5>";
            } else {
                if (@unlink($path_to_dir . "/" . $del)) {
                    echo "<h5>" . _("Deleted") . " " . $del . "!</h5>";
                } else {
                    echo "<h5>" . sprintf(_("Error Deleting %s"), $del) . "!</h5>";
                }
                //kill_mpg123();
                needreload();
            }
        }
        if ($application === false) {
            $file_array = build_list();
            draw_list($file_array, $path_to_dir, $category);
        }
        ?>
	<br><br><br><br><br><br>
<?php 
    }
}
?>

Example #8
0
        }
        ?>
		<tr>
			<td class="left"><?php 
        echo getString('permissions');
        ?>
</td>
			<td colspan="2">
			<?php 
        if ($r['is_admin']) {
            echo "Site Administrator";
        } else {
            $permissions = array_merge(db_array('SELECT m.title' . langExt() . ' title FROM modules m JOIN users_to_modules a ON m.id = a.module_id WHERE a.user_id = ' . $_GET['id'] . ' AND a.is_admin = 1 ORDER BY m.title'), db_array('SELECT m.title' . langExt() . ' title FROM modulettes m JOIN users_to_modulettes a ON m.id = a.modulette_id WHERE a.user_id = ' . $_GET['id'] . ' ORDER BY m.title'));
            if (count($permissions)) {
                sort($permissions);
                echo draw_list($permissions);
            } else {
                echo getString('none');
            }
        }
        ?>
			</td>
		</tr>
	<?php 
    }
    if (getOption("staff_showhome")) {
        ?>
	<tr class="group">
		<td colspan="3">Home Contact Information [private]</td>
	</tr>
	<tr>
Example #9
0
<?php

draw_list("android");
Example #10
0
         $thisobj["Fields"]["button_w"] = FW_MODIFY;
         $thisobj["Fields"]["button_newscad"] = PRATICHE_ADD_EVENT;
         $thisobj["Fields"]["button_newpres"] = PRATICHE_ADD_PREST;
         $thisobj["Fields"]["button_newdoc"] = PRATICHE_ADD_DOC;
     }
     $thisobj["Fields"]["button_pres"] = make_button($CONF[url_base] . $CONF[dir_modules] . "prestazioni/pages/prestazioni_view.php?form_id=listprestaz&form_page=1&ref_id[text]=&ref_id[realval][]=" . $_GET[id], PRESTAZIONI_TITLE);
     $thisobj["Fields"]["button_scad"] = make_button($CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_view.php?form_id=listcont&form_page=1&ref_prat[text]=&ref_prat[realval][]=" . $_GET[id], PRATICHE_IMPEGN);
     $thisobj["Fields"]["button_doc"] = make_button($CONF[url_base] . $CONF[dir_modules] . "document/pages/documents_view.php?form_id=listdoc&form_page=1&ref_prat[text]=&ref_prat[realval][]=" . $_GET[id], DOCUMENT_TITLE);
     $thisobj["Fields"]["button_dbox"] = make_button($CONF[url_base] . $CONF[dir_modules] . "document/pages/dropbox_view.php?form_id=listdoc&form_page=1&ref_prat[text]=&ref_prat[realval][]=" . $_GET[id], DOCUMENT_TITLE_DROPBOX);
     $thisobj["Fields"]["button_sitcont"] = make_button_clean(PRATICHE_SITCONT, 'onClick="loadLayerWindow(\'' . $CONF[url_base] . $CONF[dir_modules] . 'pratiche/pages/pratiche_sitcont.php?id=' . $_GET[id] . '\');"');
     $thisobj["Fields"]["button_contr_unif"] = make_button_clean(PRATICHE_CONTR_UNIF, 'onClick="javascript:MsgBox(\'' . $tx_contrib_un . '\')"');
     $thislist = load_fwobject("lists", "calendar", 3);
     $thislist1 = load_fwobject("lists", "pratiche", 3);
     $thisobj["Fields"]["scad_list"] = draw_list($thislist, "calendar");
     ///ECCO
     $thisobj["Fields"]["riun_list"] = draw_list($thislist1, "pratiche");
     $thisobj["Fields"]["contr_unif"] = "Contributo unificato" . "::func=>pr_contr_unif";
     print draw_object($thisobj, intval($_GET[id]), $module);
 } elseif ($_GET[action] == "hist") {
     $response[title] = PRATICHE_MOVETIT;
     $rsdupe = $DB->Execute("SELECT * FROM calendar WHERE ref_prat=" . $_GET[id]);
     if ($rsdupe->RecordCount() > 10) {
         $response[text] = PRATICHE_MOVE_ERRCAL . "<br><br>" . make_button("pratiche_show.php?id=" . $_GET[id], PRATICHE_BACK_SHOW);
     } else {
         $response[text] = PRATICHE_MOVE_TXT . "<br><br>" . make_button("pratiche_show.php?action=histok&id=" . $_GET[id], PRATICHE_MOVETIT) . " &nbsp;&nbsp;&nbsp;&nbsp" . make_button("pratiche_show.php?id=" . $_GET[id], PRATICHE_BACK_SHOW);
     }
     print draw_response($response);
 } elseif ($_GET[action] == "histok") {
     $response[title] = PRATICHE_MOVETIT;
     $rsdupe = $DB->Execute("SELECT * FROM calendar WHERE ref_prat=" . $_GET[id]);
     if ($rsdupe->RecordCount() > 10) {
Example #11
0
<?php

include '../include.php';
$emails = array('*****@*****.**', 'foo [at] bar', 'test@mweb.co.za;testest@clara.net');
$emails = db_array('SELECT email FROM users WHERE is_active = 1 ORDER BY email');
$good = $bad = array();
foreach ($emails as $e) {
    if (!($good[] = format_email($e))) {
        array_pop($good);
        $bad[] = $e;
    }
}
echo 'good emails:' . draw_list($good);
echo '<hr>bad emails:' . draw_list($bad);
//email($emails, 'this is some test content', 'this is a test');
Example #12
0
     $thisobj["Fields"]["button_w"] = FW_MODIFY;
     $thisobj["Fields"]["button_d"] = FW_DELETE;
     if ($rs_lock->RecordCount() == 0) {
         $thisobj["Fields"]["button_v"] = '<input type="button" value="' . DOCUMENT_OPEN_WEB . '" class="bot-submit" onClick="newwin = window.open(\'' . $CONF[url_base] . $CONF[dir_upload] . 'document/' . $result[filename] . '-' . $result[id] . '-' . $result[version] . '.' . $result[ext] . '\',\'newwin\',\'left=0,top=0,screenX=0,screenY=0,width=800,height=600,resizable=yes,scrollbars=yes\'); newwin.resizeTo(screen.width,screen.height);">';
         if ($_SESSION[history] == 0) {
             $thisobj["Fields"]["button_w"] = make_button("mod_document.php?id=" . $_GET[id], FW_MODIFY);
         } else {
             $thisobj["Fields"]["button_w"] = FW_MODIFY;
         }
         if ($_SESSION["user"][admin] == 1) {
             $thisobj["Fields"]["button_d"] = make_button_del($CONF[url_base] . $CONF[dir_modules] . "document/pages/documents_view.php?form_id=listdoc&form_page=1&ref_prat[text]=&ref_prat[realval][]=" . $result[ref_prat] . "&id=" . $_GET[id] . "&action=del", FW_DELETE);
         } else {
             $thisobj["Fields"]["button_d"] = FW_DELETE;
         }
         if ($rs_tmp->RecordCount() > 0) {
             $thisobj["Fields"]["history"] = draw_list($thislist, $module);
         } else {
             $thisobj["Fields"]["history"] = '<b><center>' . DOCUMENT_NOHIST . '</center></b>';
         }
     } else {
         $rs_user = $DB->Execute("SELECT * FROM " . $CONF[auth_db_table] . " WHERE id=" . $result[user_lock]);
         $thisuser = $rs_user->FetchRow();
         $thisobj["Fields"]["history"] = '<b><center>' . DOCUMENT_LOCKED . ' ' . $thisuser[nome] . '</center></b>';
     }
     print draw_object($thisobj, $myid, $module);
 } else {
     $response[title] = FW_ERROR_NO_PERM;
     $response[text] = FW_ERROR_NO_PERM_TXT;
     $iserror = 1;
     print draw_response($response);
 }
Example #13
0
             </tr>
              <tr>
                <td width="100%" colspan="2" onMouseOver="this.className=\'pratica-over-sub\'" onMouseOut="this.className=\'null\'">' . draw_list($thislist, "pratiche") . '</td>
      			   </tr>';
    } else {
        $thisobj["Fields"]["prat_col"] = "";
        $thisobj["Fields"]["button_sitcont"] = "";
    }
    $rs2 = $DB->Execute(perm_sql_read("SELECT * FROM calendar p WHERE %[PERM]% AND (ref_cont=" . $_GET[id] . ")", "calendar"));
    if ($rs2->RecordCount() > 0) {
        $restlist = load_fwobject("lists", "calendar", 6);
        $restlist["sql_select"] = "SELECT * FROM calendar p WHERE %[PERM]% AND (ref_cont=" . $_GET[id] . ")";
        $thisobj["Fields"]["pro_restr"] = '  <tr>
                <th colspan="2" width="100%" align="center"> <b>' . CONTACT_PROVV_RESTR . '</b></th>
             </tr>
              <tr>
                <td width="100%" colspan="2" onMouseOver="this.className=\'pratica-over-sub\'" onMouseOut="this.className=\'null\'">' . draw_list($restlist, "calendar") . '</td>
      			   </tr>';
    } else {
        $thisobj["Fields"]["pro_restr"] = "";
    }
    print draw_object($thisobj, intval($_GET[id]), $module);
} else {
    $response[title] = FW_ERROR_NO_PERM;
    $response[text] = FW_ERROR_NO_PERM_TXT;
    $iserror = 1;
    print draw_response($response);
}
$PAGE[PAGE_CONTENT] = ob_get_contents();
ob_end_clean();
final_render();