fork download
  1. <?php
  2. CModule::IncludeModule('crm');
  3. CModule::IncludeModule('bizproc');
  4. //$rootActivity = $this->GetRootActivity();
  5. $count = "0";
  6. $max_count = "20000";
  7. $id_less_than = "300000";//params
  8. $stack = [];
  9.  
  10. while ($count < $max_count) {
  11. $Contacts = CCrmContact::GetList('ASC',array("UF_CRM_1570696280" => null, "<ID" => $id_less_than));
  12. while ($SingleContact = $Contacts -> Fetch()){
  13. array_push($stack, $SingleContact['ID']);//набираем массив id
  14. $count = $count + 1;//+1
  15. }
  16. }
  17.  
  18. if ($count == 0) {
  19. var_dump('0');
  20. //$this->SetVariable("companies_to_push", "0");
  21. }
  22. else {
  23. var_dump($stack);
  24. //$this->SetVariable("companies_to_push", $count);
  25. //$this->SetVariable("company_ids", $stack);
  26. }
Runtime error #stdin #stdout #stderr 0.02s 24164KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Uncaught Error: Class 'CModule' not found in /home/dKNEoM/prog.php:2
Stack trace:
#0 {main}
  thrown in /home/dKNEoM/prog.php on line 2