} cot_redirect(cot_url('sbr', 'id=' . $id . '&num=' . $num, '#addpost', true)); } $out['subtitle'] = $sbr['sbr_title']; $out['head'] .= $R['code_noindex']; $mskin = cot_tplfile(array('sbr', $role), 'plug'); /* === Hook === */ foreach (cot_getextplugins('sbr.main') as $pl) { include $pl; } /* ===== */ $t = new XTemplate($mskin); $t->assign(cot_generate_projecttags($sbr['sbr_pid'], 'SBR_PROJECT_')); $t->assign(cot_generate_usertags($sbr['sbr_employer'], 'SBR_EMPLOYER_')); $t->assign(cot_generate_usertags($sbr['sbr_performer'], 'SBR_PERFORMER_')); $t->assign(cot_generate_sbrtags($sbr, 'SBR_', $usr['isadmin'], $cfg['homebreadcrumb'])); $sqllist_rowset = $db->query("SELECT * FROM {$db_sbr_stages} WHERE stage_sid=" . $id . " ORDER BY stage_num ASC")->fetchAll(); foreach ($sqllist_rowset as $stage) { $t->assign(array('STAGENAV_ROW_ID' => $stage['stage_id'], 'STAGENAV_ROW_NUM' => $stage['stage_num'], 'STAGENAV_ROW_TITLE' => $stage['stage_title'], 'STAGENAV_ROW_TEXT' => $stage['stage_text'], 'STAGENAV_ROW_STATUS' => $stage['stage_status'], 'STAGENAV_ROW_URL' => cot_url('sbr', 'id=' . $id . '&num=' . $stage['stage_num']))); $t->parse('MAIN.STAGENAV_ROW'); } if (empty($action)) { if (!empty($num)) { require_once cot_incfile('sbr', 'plug', 'stage'); } else { require_once cot_incfile('sbr', 'plug', 'info'); } if (!empty($role)) { $query_string = " AND (post_to=0 OR post_to=" . $usr['id'] . " OR post_from=" . $usr['id'] . ")"; } /* === Hook === */
/* === Hook === */ foreach (cot_getextplugins('sbr.list.query') as $pl) { include $pl; } /* ===== */ $where = $where ? 'WHERE ' . implode(' AND ', $where) : ''; $order = $order ? 'ORDER BY ' . implode(', ', $order) : ''; $totalitems = $db->query("SELECT COUNT(*) FROM {$db_sbr} \n\t" . $where . "")->fetchColumn(); $sqllist = $db->query("SELECT * FROM {$db_sbr} AS s \n\t" . $where . "\n\t" . $order . "\n\tLIMIT {$d}, " . $cfg['plugin']['sbr']['maxrowsperpage']); $pagenav = cot_pagenav('sbr', '', $d, $totalitems, $cfg['plugin']['sbr']['maxrowsperpage']); $sqllist_rowset = $sqllist->fetchAll(); /* === Hook === */ $extp = cot_getextplugins('sbr.list.loop'); /* ===== */ foreach ($sqllist_rowset as $sbr) { $jj++; $t->assign(cot_generate_usertags($sbr['sbr_employer'], 'SBR_ROW_EMPLOYER_')); $t->assign(cot_generate_usertags($sbr['sbr_performer'], 'SBR_ROW_PERFORMER_')); $t->assign(cot_generate_sbrtags($sbr, 'SBR_ROW_')); /* === Hook - Part2 : Include === */ foreach ($extp as $pl) { include $pl; } /* ===== */ $t->parse("MAIN.SBR_ROW"); } /* === Hook === */ foreach (cot_getextplugins('sbr.list.tags') as $pl) { include $pl; } /* ===== */