HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //tmp/creator-studio-redesign-helper.patch
*** Begin Patch
*** Update File: /home/kiwerkzeuge.de/public_html/creator-studio/_lib/redesign.php
@@
     </div>
     <?php
 }
 
++function cs_r_account_switcher(string $lang, array $copy, string $variant = 'wide'): void
+{
+    $isEn = $lang === 'en';
+    $options = cs_session_account_options();
+    $current = null;
+    foreach ($options as $option) {
+        if (!empty($option['is_current'])) {
+            $current = $option;
+            break;
+        }
+    }
+    if ($current === null && $options !== []) {
+        $current = $options[0];
+    }
+    $count = count($options);
+    $title = $current !== null ? (string) ($current['label'] ?? '') : ($isEn ? 'No TikTok connected' : 'Kein TikTok verbunden');
+    $caption = $count > 1
+        ? ($isEn ? 'Switch the active account before reviewing or sending content to TikTok.' : 'Wechsle das aktive Konto, bevor du Content prüfst oder an TikTok sendest.')
+        : ($isEn ? 'Connect another TikTok account here when you need a second creator or client slot.' : 'Verbinde hier ein weiteres TikTok-Konto, wenn du einen zweiten Creator- oder Kundenslot brauchst.');
+    $classes = 'cs-account-mini cs-account-panel' . ($variant === 'side' ? ' compact' : '');
+    ?>
+    <div class="<?= cs_h($classes) ?>" id="account">
+      <div class="cs-account-head">
+        <span class="cs-status-pill <?= $count > 0 ? 'ready' : 'action_needed' ?>"><?= cs_h($count > 0 ? cs_r_status_label('ready', $lang) : cs_r_status_label('action_needed', $lang)) ?></span>
+        <strong><?= cs_h($title) ?></strong>
+        <p class="cs-form-help"><?= cs_h($caption) ?></p>
+      </div>
+      <?php if ($count > 1): ?>
+        <form class="cs-account-switcher" method="post">
+          <input type="hidden" name="csrf" value="<?= cs_h(cs_get_csrf_token()) ?>" />
+          <input type="hidden" name="action" value="switch-tiktok-account" />
+          <input type="text" name="website" value="" tabindex="-1" autocomplete="off" class="cs-hp" aria-hidden="true" />
+          <label class="cs-field"><span><?= cs_h($isEn ? 'Active TikTok account' : 'Aktives TikTok-Konto') ?></span><select name="account_ref" required>
+            <?php foreach ($options as $option): ?>
+              <?php
+              $meta = [];
+              $meta[] = (int) ($option['scope_count'] ?? 0) . ' scopes';
+              $meta[] = !empty($option['creator_info_ready']) ? ($isEn ? 'Creator Info ready' : 'Creator Info bereit') : ($isEn ? 'Creator Info open' : 'Creator Info offen');
+              if ((int) ($option['operation_count'] ?? 0) > 0) {
+                  $meta[] = (int) $option['operation_count'] . ($isEn ? ' publish ops' : ' Publish-Läufe');
+              }
+              if (!empty($option['agency_linked'])) {
+                  $meta[] = $isEn ? 'agency slot' : 'Agentur-Slot';
+              }
+              ?>
+              <option value="<?= cs_h((string) ($option['ref'] ?? '')) ?>" <?= !empty($option['is_current']) ? 'selected' : '' ?>><?= cs_h((string) ($option['label'] ?? 'TikTok')) ?> · <?= cs_h(implode(' · ', $meta)) ?></option>
+            <?php endforeach; ?>
+          </select></label>
+          <button class="cs-button secondary" type="submit"><?= cs_h($isEn ? 'Switch' : 'Wechseln') ?></button>
+        </form>
+      <?php elseif ($count === 1 && $current !== null): ?>
+        <div class="cs-account-state">
+          <span><?= cs_h((int) ($current['scope_count'] ?? 0) . ' scopes') ?></span>
+          <span><?= cs_h(!empty($current['creator_info_ready']) ? ($isEn ? 'Creator Info ready' : 'Creator Info bereit') : ($isEn ? 'Creator Info open' : 'Creator Info offen')) ?></span>
+          <span><?= cs_h((int) ($current['operation_count'] ?? 0) . ($isEn ? ' publish ops' : ' Publish-Läufe')) ?></span>
+        </div>
+      <?php endif; ?>
+      <div class="cs-actions compact"><a class="cs-button secondary" href="/creator-studio/auth/tiktok/start.php"><?= cs_h($count > 0 ? ($isEn ? 'Connect another TikTok' : 'Weiteres TikTok verbinden') : $copy['cta_tiktok']) ?></a></div>
+    </div>
+    <?php
+}
 
 function cs_r_pilot_path(string $lang, array $copy, string $class = ''): void
*** End Patch