{"id":160681,"date":"2012-11-29T10:58:04","date_gmt":"2012-11-29T06:58:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=160681"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=160681","title":{"rendered":"<span class=\"post_title\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f AD \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/71e\/c40\/32d\/71ec4032d8815c3d7d869bfc22a0b2f4.jpg\"\/><\/p>\n<p>  \u041d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0441\u044f \u0441 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/Active_Directory\">AD<\/a> \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/LDAP\">ldap<\/a> \u0447\u0435\u0440\u0435\u0437 php \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u2014 \u0432 \u0444\u0438\u0440\u043c\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0430\u0434\u043c\u0438\u043d \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e, \u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c AD \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u2014 \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u0445 \u0438 \u0432\u044b\u0434\u0430\u0435\u0442 \u0435\u0435 \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u043a\u0430\u043a \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, MySQL. \u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f AD \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a, \u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u043b\u044f\u0436\u0435\u0442 \u043d\u0430 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430. \u0418 \u0442\u0443\u0442 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0415\u0441\u043b\u0438 \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b AD \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0432\u043e\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u043e \u0432\u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0432\u043e\u0434 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b \u043f\u043e AD \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 VBScript (\u043a\u0430\u0436\u0435\u0442\u0441\u044f), \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u0443\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0430 php-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ldap_add() \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e <a href=\"http:\/\/yandex.ru\/yandsearch?text=ldap_add\">\u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a>.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u2014 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u0441\u043e \u0432\u0441\u0435\u043c \u00ab\u043e\u0431\u0432\u0435\u0441\u043e\u043c\u00bb, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a.<\/p>\n<p>  \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d, \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b, \u0438 \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c. \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u2014 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e:<\/p>\n<pre><code class=\"php\">\/* Connection parameters *\/ \t$ldap_host = &quot;xxx.local&quot;; # domain controller or ip-address \t$ldap_port = &quot;389&quot;; # port for connection \t$ldap_user =&quot;admin@xxx.local&quot;; # AD-user \t$ldap_pass = &quot;123321&quot;;# AD-user's password     \/* Open connection *\/ \t$connect = ldap_connect( $ldap_host, $ldap_port); \tldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3); \tldap_set_option($connect, LDAP_OPT_REFERRALS, 0); \t$bind = ldap_bind($connect, $ldap_user, $ldap_pass); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u044b\u0432\u043e\u0434 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438:<\/p>\n<pre><code class=\"php\">\/* Hierarchical tree *\/ \tfunction build_tree($connect, $ou = '', $base_dn = 'OU=!Users_all,DC=xxx,DC=local') \t{ \t\t$specific_dn = $base_dn; \t\tif ('' != $ou) {$specific_dn = 'OU='.$ou.','.$base_dn;} \t\t \t\t$filter = 'ou=*'; \t\t \t\t$justthese = array(&quot;ou&quot;);  \t\t$sr = ldap_list($connect, $specific_dn, $filter, $justthese);  \t\t$info = ldap_get_entries($connect, $sr); \t\t \t\t$result = '';  \t\tfor ($i=0; $i &lt; $info[&quot;count&quot;]; $i++)  \t\t{ \t\t\t$specific_ou = $info[$i][&quot;ou&quot;][0]; \t\t\t$result .= '&lt;ul&gt;'; \t\t\t\t$result .= '&lt;li&gt;&lt;input type=&quot;radio&quot; name=&quot;dep&quot; value=&quot;OU='.$specific_ou.','.$specific_dn.'&quot; title=&quot;'.$specific_ou.'&quot; \/&gt; '.$specific_ou; \t\t\t\t$result .= build_tree($connect, $specific_ou, $specific_dn); \t\t\t\t$result .= '&lt;\/li&gt;'; \t\t\t$result .= '&lt;\/ul&gt;'; \t\t} \t\t\t \t\treturn $result; \t} <\/code><\/pre>\n<p>  \u0412 \u0432\u044b\u0432\u043e\u0434 \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u043e\u0440\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043d\u0430\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c\u0443 \u0441\u0435\u0431\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u043b\u044e\u0431\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430:<\/p>\n<pre><code class=\"php\">\/* Output *\/ \techo ' \t&lt;form method=&quot;POST&quot; action=&quot;'.$_SERVER['REQUEST_URI'].'&quot;&gt; \t \t\t&lt;h3&gt;\u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a&lt;\/h3&gt;\t \t\t \t\t&lt;input type=&quot;hidden&quot; name=&quot;new_emp&quot; value=&quot;1&quot; \/&gt; \t\t \t\t&lt;input type=&quot;text&quot; name=&quot;family_name&quot; value=&quot;\u0424\u0430\u043c\u0438\u043b\u0438\u044f&quot; size=&quot;20&quot; \/&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;first_name&quot; value=&quot;\u0418\u043c\u044f&quot; size=&quot;20&quot; \/&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;fathers_name&quot; value=&quot;\u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e&quot; size=&quot;20&quot; \/&gt; \t\t&lt;br\/&gt; \t\t&lt;h3&gt;\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c&lt;\/h3&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;position&quot; value=&quot;\u0412\u0440\u0430\u0447&quot; size=&quot;40&quot; \/&gt; \t\t&lt;br\/&gt; \t\t&lt;h3&gt;\u041d\u043e\u043c\u0435\u0440 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430&lt;\/h3&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;tel_num&quot; value=&quot;+7(999) 999-9999&quot; size=&quot;20&quot; \/&gt; \t\t \t\t&lt;h3&gt;\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435&lt;\/h3&gt; \t\t \t\t&lt;div class=&quot;tree&quot;&gt; \t\t\t'.build_tree($connect).' \t\t&lt;\/div&gt; \t\t \t\t&lt;br\/&gt; \t\t&lt;input type=&quot;submit&quot; value=&quot;\u0421\u043e\u0437\u0434\u0430\u0442\u044c&quot; \/&gt; \t \t&lt;\/form&gt;';\t <\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/p>\n<pre><code class=\"php\">\/* Input check *\/  \t$errors = ''; \t \t\/* \tEXAMPLE OF CORRECT POST \tnew_emp: 1 \tfamily_name: \u0424\u0430\u043c\u0438\u043b\u0438\u044f \tfirst_name: \u0418\u043c\u044f \tfathers_name: \u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e \tposition: \u0412\u0440\u0430\u0447 \ttel_num: +7(999) 999-9999 \tdep: \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u041b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \t*\/ \t \tif(isset($_POST['new_emp'])) \t{ \t\tforeach($_POST as $key =&gt; $value) \t\t{ \t\t\tif('' == $value) {$errors .= '\u041f\u043e\u043b\u0435 '.$key.' \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e&lt;br\/&gt;'; break;}  \t\t\telse {$$key = $value;} \t\t} \t\tif(!isset($_POST['dep'])) {$errors .= '\u041f\u043e\u043b\u0435 \u00ab\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u00bb \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e&lt;br\/&gt;';} \t\t \t\t\/*  Creating employee *\/ \t\tif('' == $errors) \t\t{ \t\t\t$trans_family_name = translit($family_name); \t\t\t$trans_first_name = translit($first_name); \t\t\t$trans_fathers_name = translit($fathers_name); \t\t\t$account = $trans_family_name.substr($trans_first_name, 0, 1).substr($trans_fathers_name, 0, 1); \t\t\t$dn = 'CN='.$family_name.' '.$first_name.' '.$fathers_name.','.$dep; \t\t\t \t\t\t\/\/Getting manager \t\t\t$filter = '(&(objectClass=user)(objectCategory=PERSON))'; \t\t\t$sr = ldap_search($connect, $dep, $filter); \t\t\t$info = ldap_get_entries($connect, $sr); \t\t\t\/\/echo Arratomy($info); \t\t\t$manager = $info[0]['manager'][0]; \t\t\t \t\t\t$department = explode(',', $dep);\t\t\t \t\t\t$department = str_replace('OU=', '', $department[0]); \t\t\t \t\t\t$newuser['cn'] = $family_name.' '.$first_name.' '.$fathers_name; \t\t\t$newuser[&quot;objectclass&quot;][0] = &quot;top&quot;; \t\t\t$newuser[&quot;objectclass&quot;][1] = &quot;person&quot;; \t\t\t$newuser[&quot;objectclass&quot;][2] = &quot;organizationalPerson&quot;; \t\t\t$newuser[&quot;objectclass&quot;][3] = &quot;user&quot;; \t\t\t$newuser['displayname'] = $family_name.' '.$first_name.' '.$fathers_name; \t\t\t$newuser['givenname'] = $first_name.' '.$fathers_name; \t\t\t$newuser['name'] = $family_name.' '.$first_name.' '.$fathers_name; \t\t\t$newuser['sn'] = $family_name; \t\t\t$newuser['description'] = $position; \t\t\t$newuser['mobile'] = $tel_num; \t\t\t$newuser['samAccountName'] = $account; \t\t\t$newuser['userPrincipalName'] = $account.'@xxx.local'; \t\t\t$newuser['title'] = $position; \t\t\t$newuser['department'] = $department; \t\t\t$newuser['manager'] = $manager; \t\t\t$newuser['useraccountcontrol'] = 0x0002; \/\/ Account disabled \t\t\t$newuser['pwdLastSet'] = 0; \/\/ User must change password \t\t\t$newuser['userPassword'] = '123321'; \t\t\t \t\t\t\/\/echo '&lt;h2&gt;New AD user&lt;\/h2&gt;'.Arratomy($newuser); \t\t\t\t\t \t\t\t$result = ldap_add($connect, $dn, $newuser); \t\t\t \t\t\t \t\t\tif($result) {echo '&lt;div class=&quot;success&quot;&gt;\u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u043d&lt;\/div&gt;';} else {$errors = ldap_error($connect);} \t\t\t\t\t\t \t\t}\t \t\tif('' != $errors) {echo '&lt;h2 style=&quot;color:red;&quot;&gt;\u041e\u0448\u0438\u0431\u043a\u0438&lt;\/h2&gt;&lt;div class=&quot;errors&quot;&gt;'.$errors.'&lt;\/div&gt;';} \t} <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u2014 \u0447\u0442\u043e \u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0443\u0436\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u044f\u0441\u043d\u0435\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f.<br \/>  \u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"php\">\t$dn = 'CN=\u0424\u0430\u043c\u0438\u043b\u0438\u044f \u0418\u043c\u044f \u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e,OU=!Users_all,DC=xxx,DC=local'; \/\/ Distinguished name \t$newuser['cn'] = $family_name.' '.$first_name.' '.$fathers_name; \t$newuser[&quot;objectclass&quot;][0] = &quot;top&quot;; \t$newuser[&quot;objectclass&quot;][1] = &quot;person&quot;; \t$newuser[&quot;objectclass&quot;][2] = &quot;organizationalPerson&quot;; \t$newuser[&quot;objectclass&quot;][3] = &quot;user&quot;; \t$newuser['samAccountName'] = $account; \t$newuser['userPrincipalName'] = $account.'@xxx.local'; <\/code><\/pre>\n<p>  \u0411\u0435\u0437 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 (+ \u0441\u0442\u0438\u043b\u0438 \u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438):<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\"> &lt;style&gt;  .tree {height:500px; overflow-y:scroll; border:1px solid #ccc;} \t.tree li:hover {cursor:pointer;} \t.tree input {display:inline;} .errors {margin:10px 0px; border: 1px dotted red; padding:10px;} .success {margin:10px 0px; border: 1px dotted green; padding:10px;}  &lt;\/style&gt;  &lt;?php  \/\/ini_set('display_errors','On'); error_reporting(E_ALL | E_STRICT);  \/* Service functions *\/ \tfunction Arratomy($array) \t{ \t\t$result = &quot;\\n&quot;.'&lt;span&gt;Array (&lt;b&gt;'.sizeof($array).'&lt;\/b&gt; items)&lt;\/span&gt;'.&quot;\\n&quot;.'&lt;ol&gt;'.&quot;\\n&quot;; \t\tforeach ($array as $key =&gt; $value) \t\t{ \t\t\t$result .= '&lt;li&gt;'; \t\t\tif(is_array($value)) {$result .= '&lt;b&gt;'.$key.'&lt;\/b&gt;: '.Arratomy($array[$key]);} \t\t\telse {$result .= '&lt;b&gt;'.$key.'&lt;\/b&gt;: '.$value.'&lt;\/br&gt;'.&quot;\\n&quot;;} \t\t\t$result .= '&lt;\/li&gt;'; \t\t} \t\t$result .= '&lt;\/ol&gt;'.&quot;\\n&quot;; \t\treturn $result; \t}  \tfunction translit($text)  \t{ \t\t$alphabet_ru = array \t\t\t( \t\t\t\t'\u0451','\u0439','\u0446','\u0443','\u043a','\u0435','\u043d','\u0433', '\u0448','\u0449','\u0437','\u0445','\u044a','\u0444','\u044b','\u0432', '\u0430','\u043f','\u0440','\u043e','\u043b','\u0434','\u0436','\u044d', '\u044f','\u0447','\u0441','\u043c','\u0438','\u0442','\u044c','\u0431','\u044e', \t\t\t\t'\u0401','\u0419','\u0426','\u0423','\u041a','\u0415','\u041d','\u0413', '\u0428','\u0429','\u0417','\u0425','\u042a','\u0424','\u042b','\u0412', '\u0410','\u041f','\u0420','\u041e','\u041b','\u0414','\u0416','\u042d', '\u042f','\u0427','\u0421','\u041c','\u0418','\u0422','\u042c','\u0411','\u042e', \t\t\t\t' ' \t\t\t); \t\t  \t\t$alphabet_eng = array \t\t\t( \t\t\t\t'e','y','ts','u','k','e','n','g', 'sh','sch','z','h','','f','y','v', 'a','p','r','o','l','d','j','e', 'ya','ch','s','m','i','t','','b', 'yu', \t\t\t\t'E','Y','Ts','U','K','E','N','G', 'Sh','Sch','Z','H','','F','Y','V', 'A','P','R','O','L','D','J','E', 'Ya','Ch','S','M','I','T','','B', 'Yu', \t\t\t\t'_' \t\t\t); \t\t  \t\treturn str_replace($alphabet_ru, $alphabet_eng, $text); \t} \t   \/* Connection parameters *\/ \t$ldap_host = &quot;xxx.local&quot;; # domain controller or ip-address \t$ldap_port = &quot;389&quot;; # port for connection \t\/\/ $filter = &quot;ou=*&quot;; # search any department \/\/ overridden in the function \t\/\/ $base_dn = &quot;OU=!Users_all,DC=xxx,DC=local&quot;; # specific OU \/\/ overridden in the function \t$ldap_user =&quot;admin@xxx.local&quot;; # AD-user \t$ldap_pass = &quot;123321&quot;;# AD-user's password     \/* Open connection *\/ \t$connect = ldap_connect( $ldap_host, $ldap_port); \tldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3); \tldap_set_option($connect, LDAP_OPT_REFERRALS, 0); \t$bind = ldap_bind($connect, $ldap_user, $ldap_pass);  \/* Input check *\/  \t\/\/echo '&lt;h2&gt;POST&lt;\/h2&gt;'.Arratomy($_POST);  \t$errors = ''; \t \t\/* \tEXAMPLE OF CORRECT POST \tnew_emp: 1 \tfamily_name: \u0424\u0430\u043c\u0438\u043b\u0438\u044f \tfirst_name: \u0418\u043c\u044f \tfathers_name: \u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e \tposition: \u0412\u0440\u0430\u0447 \ttel_num: +7(999) 999-9999 \tdep: \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u041b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \t*\/ \t \tif(isset($_POST['new_emp'])) \t{ \t\tforeach($_POST as $key =&gt; $value) \t\t{ \t\t\tif('' == $value) {$errors .= '\u041f\u043e\u043b\u0435 '.$key.' \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e&lt;br\/&gt;'; break;}  \t\t\telse {$$key = $value;} \t\t} \t\tif(!isset($_POST['dep'])) {$errors .= '\u041f\u043e\u043b\u0435 \u00ab\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u00bb \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e&lt;br\/&gt;';} \t\t \t\t\/*  Creating employee *\/ \t\tif('' == $errors) \t\t{ \t\t\t$trans_family_name = translit($family_name); \t\t\t$trans_first_name = translit($first_name); \t\t\t$trans_fathers_name = translit($fathers_name); \t\t\t$account = $trans_family_name.substr($trans_first_name, 0, 1).substr($trans_fathers_name, 0, 1); \t\t\t$dn = 'CN='.$family_name.' '.$first_name.' '.$fathers_name.','.$dep; \t\t\t \t\t\t\/\/Getting manager \t\t\t$filter = '(&(objectClass=user)(objectCategory=PERSON))'; \t\t\t$sr = ldap_search($connect, $dep, $filter); \t\t\t$info = ldap_get_entries($connect, $sr); \t\t\t\/\/echo Arratomy($info); \t\t\t$manager = $info[0]['manager'][0]; \t\t\t \t\t\t$department = explode(',', $dep);\t\t\t \t\t\t$department = str_replace('OU=', '', $department[0]); \t\t\t \t\t\t$newuser['cn'] = $family_name.' '.$first_name.' '.$fathers_name; \t\t\t$newuser[&quot;objectclass&quot;][0] = &quot;top&quot;; \t\t\t$newuser[&quot;objectclass&quot;][1] = &quot;person&quot;; \t\t\t$newuser[&quot;objectclass&quot;][2] = &quot;organizationalPerson&quot;; \t\t\t$newuser[&quot;objectclass&quot;][3] = &quot;user&quot;; \t\t\t$newuser['displayname'] = $family_name.' '.$first_name.' '.$fathers_name; \t\t\t$newuser['givenname'] = $first_name.' '.$fathers_name; \t\t\t$newuser['name'] = $family_name.' '.$first_name.' '.$fathers_name; \t\t\t$newuser['sn'] = $family_name; \t\t\t$newuser['description'] = $position; \t\t\t$newuser['mobile'] = $tel_num; \t\t\t$newuser['samAccountName'] = $account; \t\t\t$newuser['userPrincipalName'] = $account.'@xxx.local'; \t\t\t$newuser['title'] = $position; \t\t\t$newuser['department'] = $department; \t\t\t$newuser['manager'] = $manager; \t\t\t$newuser['useraccountcontrol'] = 0x0002; \/\/ Account disabled \t\t\t$newuser['pwdLastSet'] = 0; \/\/ User must change password \t\t\t$newuser['userPassword'] = '123321'; \t\t\t \t\t\t\/\/echo '&lt;h2&gt;New AD user&lt;\/h2&gt;'.Arratomy($newuser); \t\t\t\t\t \t\t\t$result = ldap_add($connect, $dn, $newuser); \t\t\t \t\t\t \t\t\tif($result) {echo '&lt;div class=&quot;success&quot;&gt;\u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u043d&lt;\/div&gt;';} else {$errors = ldap_error($connect);} \t\t\t\t\t\t \t\t}\t \t\tif('' != $errors) {echo '&lt;h2 style=&quot;color:red;&quot;&gt;\u041e\u0448\u0438\u0431\u043a\u0438&lt;\/h2&gt;&lt;div class=&quot;errors&quot;&gt;'.$errors.'&lt;\/div&gt;';} \t} \t \/* Hierarchical tree *\/ \tfunction build_tree($connect, $ou = '', $base_dn = 'OU=!Users_all,DC=xxx,DC=local') \t{ \t\t$specific_dn = $base_dn; \t\tif ('' != $ou) {$specific_dn = 'OU='.$ou.','.$base_dn;} \t\t \t\t$filter = 'ou=*'; \t\t \t\t$justthese = array(&quot;ou&quot;);  \t\t$sr = ldap_list($connect, $specific_dn, $filter, $justthese);  \t\t$info = ldap_get_entries($connect, $sr); \t\t \t\t$result = '';  \t\tfor ($i=0; $i &lt; $info[&quot;count&quot;]; $i++)  \t\t{ \t\t\t$specific_ou = $info[$i][&quot;ou&quot;][0]; \t\t\t$result .= '&lt;ul&gt;'; \t\t\t\t$result .= '&lt;li&gt;&lt;input type=&quot;radio&quot; name=&quot;dep&quot; value=&quot;OU='.$specific_ou.','.$specific_dn.'&quot; title=&quot;'.$specific_ou.'&quot; \/&gt; '.$specific_ou; \t\t\t\t$result .= build_tree($connect, $specific_ou, $specific_dn); \t\t\t\t$result .= '&lt;\/li&gt;'; \t\t\t$result .= '&lt;\/ul&gt;'; \t\t} \t\t\t \t\treturn $result; \t} \t \/* Output *\/ \techo ' \t&lt;form method=&quot;POST&quot; action=&quot;'.$_SERVER['REQUEST_URI'].'&quot;&gt; \t \t\t&lt;h3&gt;\u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a&lt;\/h3&gt;\t \t\t \t\t&lt;input type=&quot;hidden&quot; name=&quot;new_emp&quot; value=&quot;1&quot; \/&gt; \t\t \t\t&lt;input type=&quot;text&quot; name=&quot;family_name&quot; value=&quot;\u0424\u0430\u043c\u0438\u043b\u0438\u044f&quot; size=&quot;20&quot; \/&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;first_name&quot; value=&quot;\u0418\u043c\u044f&quot; size=&quot;20&quot; \/&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;fathers_name&quot; value=&quot;\u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e&quot; size=&quot;20&quot; \/&gt; \t\t&lt;br\/&gt; \t\t&lt;h3&gt;\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c&lt;\/h3&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;position&quot; value=&quot;\u0412\u0440\u0430\u0447&quot; size=&quot;40&quot; \/&gt; \t\t&lt;br\/&gt; \t\t&lt;h3&gt;\u041d\u043e\u043c\u0435\u0440 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430&lt;\/h3&gt; \t\t&lt;input type=&quot;text&quot; name=&quot;tel_num&quot; value=&quot;+7(999) 999-9999&quot; size=&quot;20&quot; \/&gt; \t\t \t\t&lt;h3&gt;\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435&lt;\/h3&gt; \t\t \t\t&lt;div class=&quot;tree&quot;&gt; \t\t\t'.build_tree($connect).' \t\t&lt;\/div&gt; \t\t \t\t&lt;br\/&gt; \t\t&lt;input type=&quot;submit&quot; value=&quot;\u0421\u043e\u0437\u0434\u0430\u0442\u044c&quot; \/&gt; \t \t&lt;\/form&gt;';\t  \t \/* Close connection *\/\t \tldap_close($connect);  ?&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <habracut\/> \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/160681\/\"> http:\/\/habrahabr.ru\/post\/160681\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/71e\/c40\/32d\/71ec4032d8815c3d7d869bfc22a0b2f4.jpg\"\/><\/p>\n<p>  \u041d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0441\u044f \u0441 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/Active_Directory\">AD<\/a> \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/LDAP\">ldap<\/a> \u0447\u0435\u0440\u0435\u0437 php \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u2014 \u0432 \u0444\u0438\u0440\u043c\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0430\u0434\u043c\u0438\u043d \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e, \u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c AD \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u2014 \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u0445 \u0438 \u0432\u044b\u0434\u0430\u0435\u0442 \u0435\u0435 \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u043a\u0430\u043a \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, MySQL. \u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f AD \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a, \u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u043b\u044f\u0436\u0435\u0442 \u043d\u0430 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430. \u0418 \u0442\u0443\u0442 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-160681","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=160681"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160681\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=160681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=160681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=160681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}