13 $ct[
'etc'][
'table'] =
'task';
16 $ct[
'etc'][
'id_anagrafica'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view' );
17 if( isset(
$_REQUEST[
$ct[
'etc'][
'table'] ][
'id_responsabile'] ) ) {
18 $ct[
'etc'][
'id_anagrafica_collaboratori'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_collaboratore = 1 OR id = ?', array( array(
's' =>
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_responsabile'] ) ) );
20 $ct[
'etc'][
'id_anagrafica_collaboratori'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_collaboratore = 1' );
22 if( isset(
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_cliente'] ) ) {
23 $ct[
'etc'][
'id_anagrafica_clienti'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_cliente = 1 OR se_prospect = 1 OR id = ?', array( array(
's' =>
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_cliente'] ) ) );
25 $ct[
'etc'][
'id_anagrafica_clienti'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_cliente = 1 OR se_prospect = 1' );
29 $ct[
'etc'][
'id_priorita'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM priorita_view' );
32 $ct[
'etc'][
'id_ruolo'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM ruoli_file_view' );
36 if( isset(
$_REQUEST[
'task'][
'id_cliente'] ) ) {
37 $ct[
'etc'][
'id_progetto'][
'id_cliente'] =
$_REQUEST[
'task'][
'id_cliente'];
39 controller(
$cf[
'mysql'][
'connection'], $ct[
'etc'][
'id_progetto'],
'progetti' );
42 $ct[
'etc'][
'id_tipologia'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM tipologie_task_view' );
45 $ct[
'etc'][
'id_tipologia_attivita'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM tipologie_attivita_view' );
48 foreach( range( date(
'Y' ) + 1, 2017 ) as
$y ) {
49 $ct[
'etc'][
'anni'][] = array(
'id' => $y,
'__label__' => $y );
53 foreach( range( 1, 52 ) as
$w ) {
54 # $ct['etc']['settimane'][] = array( 'id' => $w, '__label__' => $w . ' / ' . date('d M',strtotime($y.'W'.$w)) ); 55 $ct[
'etc'][
'settimane'][] = array(
'id' => $w,
'__label__' => $w .
' / ' . substr(
int2month( ceil( $w / 4.348125 ) ), 0, 3 ) );
59 if( isset(
$_SESSION[
'account'][
'id_anagrafica'] ) ) {
60 $ct[
'etc'][
'pianificazione'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
62 'SELECT * FROM __report_ore_previste__ WHERE id_responsabile = ? ORDER BY anno_previsto, settimana_prevista',
63 array( array(
's' => ( isset(
$_REQUEST[
'task'][
'id_responsabile'] ) ) ?
$_REQUEST[
'task'][
'id_responsabile'] :
$_SESSION[
'account'][
'id_anagrafica'] ) ) );
70 $ct[
'etc'][
'timeline'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM attivita_view WHERE id_task = ? ORDER BY data ASC, timestamp_inserimento ASC', array( array(
's' =>
$_REQUEST[
'task'][
'id'] ) ) );
73 $ct[
'etc'][
'totaleore'] =
mysqlSelectValue(
$cf[
'mysql'][
'connection'],
'SELECT sum( ore ) AS t FROM attivita_view WHERE id_task = ?', array( array(
's' =>
$_REQUEST[
'task'][
'id'] ) ) );
$cf['ricerca']['template']
if(isset( $_REQUEST['amazonCheckoutSessionId'])) $_SESSION['carrello']
$_REQUEST['__view__'][ $ct['view']['id']]['__restrict__']['id_progetto']['EQ']