Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Is it possible to create a URL in the field USERID in order to search the info related to USERID ?

Hi  guys!!

I would like to change the field userid in "http://ocs-server/ocs/index.php?function=visu_computers" and attach into an ajax function link what i call "function_get_userinfo.php" where i can get directly some the info about the userid. This function returns some json data, what i included an alert popup to show what i want see.

I modified around the line #273 from the file function_table_html.php in the olders versions. It worked great.

The code i changed looked like that:

if ($v == "") $v="&nbsp";
                if ($k == "User"){
                     $v = "<a id=\"userinfo\" class=\"userinfo\" href=require/function_get_userinfo.php?q=$v>$v</a>";
                };                 
                echo "<td class='ta' >".$begin.$v.$end."</td>";

In the version 2.3RC this dont work. So where in 2.3RC i can change this? What file i can change this.

Thanks!!!
in Administrative console by (220 points)
edited by

1 Answer

0 votes
Guys, please help!

In the return of json i have this:

"data": [{
        "fields_8": "",
        "fields_6": "Linux",
        "fields_5": "",
        "fields_4": "",
        "fields_3": "",
        "TAG": "BAD",
        "lastdate": "2014-07-02 14:09:14",
        "name": "<a href='index.php?function=computer&head=1&systemid=3718'>447<\/a>",
        "ID": "3718",
        "userid": "SYSTEM",
        "osname": "Microsoft Windows 7 Professional",
        "memory": "1996",
        "processors": "2834",
        "workgroup": "domain.br",
        "osversion": "6.1.7601",
        "oscomments": "Service Pack 1",
        "processort": "Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz [4 core(s) x64]",
        "processorn": "1",
        "swap": "3993",
        "lastcome": "2014-07-02 14:09:14",
        "quality": "7.1395",
        "fidelity": "99",
        "description": "Computer 447",
        "wincompany": "",
        "winowner": "TEC",
        "useragent": "OCS-NG_WINDOWS_AGENT_v2.1.1.3",
        "smanufacturer": "DELL S.A.",
        "bmanufacturer": "DELL",
        "ssn": "98745632155",
        "smodel": "none",
        "bversion": "ER",
        "ipaddr": "192.168.1.65",
        "userdomain": "",
        "ARCH": "",
        "bdate": "08\/21\/2009",
        "macaddr": "00:44:00:DD:AA:FF",
        "ipmask": "255.255.255.0",
        "ipgateway": "192.168.1.1",
        "ipsubnet": "192.168.1.0",
        "CHECK": "<input type='checkbox' name='check3718' id='check3718'  >",
        "SUP": "<a href=# OnClick='confirme(\"\",\"3718\",\"show_all\",\"SUP_PROF\",\"Do you really want to delete 447\");'><span class='glyphicon glyphicon-remove'><\/span><\/a>",
        "ACTIONS": "  <a href=# OnClick='confirme(\"\",\"3718\",\"show_all\",\"SUP_PROF\",\"Do you really want to delete 447\");'><span class='glyphicon glyphicon-remove'><\/span><\/a>   "
    },

In the line : "name": "<a href='index.php?function=computer&head=1&systemid=3718'>447<\/a>"

this is generated by OCS, which file, is modified to obtain similar result in the line:

 "userid": "SYSTEM",

I would to change like this:

"userid": "<a href='index.php?funtion_get_user.php'>SYSTEM<\/a>"

Thanks in advance!!
by (220 points)
 
Powered by Question2Answer
...