EIOS/rabprog/cron.php

44 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2023-12-28 15:39:22 +03:00
<?php
session_start();
include_once 'config.php';
$step = ''; if (isset($_GET['step'])) $step = $_GET['step'];
if (isset($argv[1])) $step = $argv[1];
if (isset($argv[2])) $des = $argv[2];
if (isset($argv[3])) $id = $argv[3];
if($step=='UchebPlans_Works'){//Обход файлов xls и обработка данных в них
$cClass = new class_ShahtPlans();
$cClass->plans_get();
}
if($step=='RPD_calculate'){//Подсчет данных в РПД
$data['tip'] = 'prorektor';
$data['cron'] = 1;
$class = new class_StatPUR($data);
$class->get_facultets();
}
if($step=='RPD_signs'){//Подпись РПД больших
$smartyC = new class_smarty();
$smarty = $smartyC->config(__DIR__.'\tpl');
$_POST['ajdes'] = 'RPDSign';
$_POST['id_disc'] = 23867;
$_POST['sign'] = 1;
$_POST['descr'] = '';
$_POST['kafvyp'] = 0;
$_SESSION['user']['statuses'][79]=1;
$class = new class_RPDSign();
$rez = $class->RPD_sign_DES($_POST);
print_r(json_decode($rez,1));
}
//Обработка подписей РПД от УР
/*
$_SESSION['user']['id'] = 565;
include_once 'inc/class_smarty.php';
$smartyC = new class_smarty();
$smarty = $smartyC->config(__DIR__.'\tpl');
$smarty->assign('TPL','/rabprog');
include_once 'inc/class_RPDSign.php';
$classRPD = new class_RPDSign();
$classRPD->rpdsign_auto(3);*/