XML

  <function name="rpcf_search_users_new" id="0x1205">
    <input>
      <integer name="poles_count" default="size(pole_code_array)" />
      <for name="i" from="0" count="size(pole_code_array)">
        <integer name="pole_code_array" array_index="i" />
      </for>
      <integer name="select_type" />
      <integer name="patterns_count" default="size(what_id)"/>
      <for name="i" from="0" count="size(what_id)">
        <integer name="what_id" array_index="i" />
        <integer name="criteria_id" array_index="i" />
        <if variable="what_id" value="33" condition="eq" comment="date">
        <integer name="data_pattern" array_index="i" />
        </if>
        <if variable="what_id" value="33" condition="ne" >
        <string name="pattern" array_index="i" />
        </if>
      </for>
    </input>
    <output>
      <integer name="user_data_size" />
      <for name="i" from="0" count="user_data_size">
        <integer name="user_id"  array_index="i" />
        <string name="login"  array_index="i" />
        <integer name="basic_account" array_index="i" />
        <string name="full_name"  array_index="i" />
        <integer name="is_blocked"  array_index="i" />
        <double name="balance"  array_index="i" />
        <integer name="ip_address_size" />
        <set dst="ip_address_size_array" src="ip_address_size" dst_index="i" />
        <for name="j" from="0" count="ip_address_size">
          <integer name="ip_group_size" />
          <set dst="ip_group_size_array" src="ip_group_size" dst_index="i,j" />
          <for name="x" from="0" count="ip_group_size">
            <integer name="type" array_index="i,j,x" />
            <ip_address name="ip" array_index="i,j,x" />
            <ip_address name="mask" array_index="i,j,x" />
          </for>
        </for>
        <for name="z" from="0" count="size(pole_code_array)">
          <set dst="pole_code" src="pole_code_array" src_index="z"/>
          <if variable="pole_code" value="4" condition="eq">
            <integer name="discount_period_id" array_index="i" />
          </if>
          <if variable="pole_code" value="6" condition="eq">
            <integer name="create_date" array_index="i" />
          </if>
          <if variable="pole_code" value="7" condition="eq">
            <integer name="last_change_date" array_index="i" />
          </if>
          <if variable="pole_code" value="8" condition="eq">
            <integer name="who_create" array_index="i" />
          </if>
          <if variable="pole_code" value="9" condition="eq">
            <integer name="who_change" array_index="i" />
          </if>
          <if variable="pole_code" value="10" condition="eq">
            <integer name="is_juridical" array_index="i" />
          </if>
          <if variable="pole_code" value="11" condition="eq">
            <string name="juridical_address" array_index="i" />
          </if>
          <if variable="pole_code" value="12" condition="eq">
            <string name="actual_address" array_index="i" />
          </if>
          <if variable="pole_code" value="13" condition="eq">
            <string name="work_telephone" array_index="i" />
          </if>
          <if variable="pole_code" value="14" condition="eq">
            <string name="home_telephone" array_index="i" />
          </if>
          <if variable="pole_code" value="15" condition="eq">
            <string name="mobile_telephone" array_index="i" />
          </if>
          <if variable="pole_code" value="16" condition="eq">
            <string name="web_page" array_index="i" />
          </if>
          <if variable="pole_code" value="17" condition="eq">
            <string name="icq_number" array_index="i" />
          </if>
          <if variable="pole_code" value="18" condition="eq">
            <string name="tax_number" array_index="i" />
          </if>
          <if variable="pole_code" value="19" condition="eq">
            <string name="kpp_number" array_index="i" />
          </if>
          <if variable="pole_code" value="21" condition="eq">
            <integer name="house_id" array_index="i" />
          </if>
          <if variable="pole_code" value="22" condition="eq">
            <string name="flat_number" array_index="i" />
          </if>
          <if variable="pole_code" value="23" condition="eq">
            <string name="entrance" array_index="i" />
          </if>
          <if variable="pole_code" value="24" condition="eq">
            <string name="floor" array_index="i" />
          </if>
          <if variable="pole_code" value="25" condition="eq">
            <string name="email" array_index="i" />
          </if>
          <if variable="pole_code" value="26" condition="eq">
            <string name="passport" array_index="i" />
          </if>
          <if variable="pole_code" value="40" condition="eq">
            <string name="district" array_index="i" />
          </if>
          <if variable="pole_code" value="41" condition="eq">
            <string name="building" array_index="i" />
          </if>
        </for>
      </for>
    </output>
  </function>

PHP

// Функция сделана для новой(правильной) реализации urfa_get_data()
 
   function rpcf_search_users_new($poles,$patterns,$sel_type) { //0x1205
      $ret=array();
      if (!$this->connection->urfa_call(0x1205)) {
         print "Error calling function ". __FUNCTION__ ."\n";
         return FALSE;
      }
      $packet = $this->connection->getPacket();
      $packet->DataSetInt(count($poles));
      for ($i=0; $i<count($poles);$i++){
        $packet->DataSetInt($poles[$i]);
        };
      $packet->DataSetInt($sel_type);
      $pat_count=count($patterns);
      $packet->DataSetInt($pat_count);
      for ($i=0;$i<count($patterns);$i++){
        $packet->DataSetInt($patterns[$i]['what_id']);
        $packet->DataSetInt($patterns[$i]['criteria_id']);
        if ($patterns[$i]['what_id']==33) {
                $packet->DataSetInt($patterns[$i]['pattern']);
        }else{
                $packet->DataSetString($patterns[$i]['pattern']);
 
        }
      }
 
      $this->connection->urfa_send_param($packet);
      if ($x = $this->connection->urfa_get_data()){
        $ret['user_data_size']=$x->DataGetInt();
        for ($i=0;$i<$ret['user_data_size'];$i++){
                $ret[$i]['user_id']=$x->DataGetInt();
                $ret[$i]['login']=$x->DataGetString();
                $ret[$i]['basic_account']=$x->DataGetInt();
                $ret[$i]['full_name']=$x->DataGetString();
                $ret[$i]['is_blocked']=$x->DataGetInt();
                $ret[$i]['balance']=$x->DataGetDouble();
                $ret[$i]['ip_address_size']=$x->DataGetInt();
                for ($j=0;$j<$ret[$i]['ip_address_size'];$j++){
                        $ret[$i]['ip_address'][$j]['ip_groups_count']=$x->DataGetInt();
                        for ($k=0;$k<$ret[$i]['ip_address'][$j]['ip_groups_count'];$k++){
                                $ret[$i]['ip_address'][$j]['ip_group'][$k]['type']=$x->DataGetInt();
                                $ret[$i]['ip_address'][$j]['ip_group'][$k]['ip']=$x->DataGetIPAddress();
                                $ret[$i]['ip_address'][$j]['ip_group'][$k]['mask']=$x->DataGetIPAddress();
                        }
                }
 
                for ($j=0;$j<count($poles);$j++){
                        if ($poles[$j]==4){$ret[$i]['discount_period_id']=$x->DataGetInt();}
                        if ($poles[$j]==6){$ret[$i]['create_date']=$x->DataGetInt();}
                        if ($poles[$j]==7){$ret[$i]['last_change_date']=$x->DataGetInt();}
                        if ($poles[$j]==8){$ret[$i]['who_create']=$x->DataGetInt();}
                        if ($poles[$j]==9){$ret[$i]['who_change']=$x->DataGetInt();}
                        if ($poles[$j]==10){$ret[$i]['is_juridical']=$x->DataGetInt();}
                        if ($poles[$j]==11){$ret[$i]['juridical_address']=$x->DataGetString();}
                        if ($poles[$j]==12){$ret[$i]['actual_address']=$x->DataGetString();}
                        if ($poles[$j]==13){$ret[$i]['work_telephone']=$x->DataGetString();}
                        if ($poles[$j]==14){$ret[$i]['home_telephone']=$x->DataGetString();}
                        if ($poles[$j]==15){$ret[$i]['mobile_telephone']=$x->DataGetString();}
                        if ($poles[$j]==16){$ret[$i]['web_page']=$x->DataGetString();}
                        if ($poles[$j]==17){$ret[$i]['icq_number']=$x->DataGetString();}
                        if ($poles[$j]==18){$ret[$i]['tax_number']=$x->DataGetString();}
                        if ($poles[$j]==19){$ret[$i]['kpp_number']=$x->DataGetString();}
                        if ($poles[$j]==21){$ret[$i]['house_id']=$x->DataGetInt();}
                        if ($poles[$j]==22){$ret[$i]['flat_number']=$x->DataGetString();}
                        if ($poles[$j]==23){$ret[$i]['entrance']=$x->DataGetString();}
                        if ($poles[$j]==24){$ret[$i]['floor']=$x->DataGetString();}
                        if ($poles[$j]==25){$ret[$i]['email']=$x->DataGetString();}
                        if ($poles[$j]==26){$ret[$i]['passport']=$x->DataGetString();}
                        if ($poles[$j]==40){$ret[$i]['district']=$x->DataGetString();}
                        if ($poles[$j]==41){$ret[$i]['building']=$x->DataGetString();}
                }
        }
      }
      return $ret;
   }
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_admin/function_name_rpcf_search_users_new_id_0x1205.txt · Последние изменения: 2009/03/25 13:59 От 91.202.204.2
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki